org.biojava.bio.structure.quaternary
Class OperatorResolver

java.lang.Object
  extended by org.biojava.bio.structure.quaternary.OperatorResolver

public class OperatorResolver
extends java.lang.Object

A class to resolve the operators for transformations

Author:
Peter Rose

Constructor Summary
OperatorResolver()
           
 
Method Summary
 java.util.List<OrderedPair<java.lang.String>> getBinaryOperators()
          Returns a list of operators for this assembly.
 java.util.List<java.lang.String> getUnaryOperators()
          Returns a list of operators for this assembly.
 void parseOperatorExpressionString(java.lang.String operatorExpression)
          Parses the operator expression and save the operators as a list of unary or binary operators (i.e.
 void setBinaryOperators(java.util.List<OrderedPair<java.lang.String>> binaryOperators)
           
 void setUnaryOperators(java.util.List<java.lang.String> unaryOperators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorResolver

public OperatorResolver()
Method Detail

parseOperatorExpressionString

public void parseOperatorExpressionString(java.lang.String operatorExpression)
                                   throws java.lang.IllegalArgumentException
Parses the operator expression and save the operators as a list of unary or binary operators (i.e. matrix multiplication, see below). Operation expressions are given in a compact notation and specify matrices from the operations list. An operation expression can be a comma-separated list 1, 5, 9, a dash-delimited range 1-60 or a matrix multiplication involving two or more lists or ranges. For instance, (X0)(1-20) specifies the portion of the X174 procapsid crystal asymmetric unit belonging to the first independent virus particle and corresponds to the 20 transformations [X0][1], [X0][2], ... , [X0][20]. See C. Lawson, Acta Cryst., D64, 874-882, 2008.

Parameters:
operatorExpression - the operator expression to be parsed
Throws:
java.lang.IllegalArgumentException

setUnaryOperators

public void setUnaryOperators(java.util.List<java.lang.String> unaryOperators)

setBinaryOperators

public void setBinaryOperators(java.util.List<OrderedPair<java.lang.String>> binaryOperators)

getUnaryOperators

public java.util.List<java.lang.String> getUnaryOperators()
Returns a list of operators for this assembly. The operators refer to the transformations that should be applied to the asym ids to generate this macromolecular assembly.

Returns:
the unary operators for this assembly

getBinaryOperators

public java.util.List<OrderedPair<java.lang.String>> getBinaryOperators()
Returns a list of operators for this assembly. The operators refer to the transformations that should be applied to the asym ids to generate this macromolecular assembly. Each ordered pair refers to the multiplication of the two transformation matrices in the pdbx_structure_oper_list category.

Returns:
the binary operators for this assembly