Package rosetta :: Package core :: Package chemical :: Module _core_chemical_ :: Class AutomorphismIterator
[hide private]
[frames] | no frames]

Class AutomorphismIterator

 object --+    
          |    
??.instance --+
              |
             AutomorphismIterator

Enumerates the automorphisms of a residue, which are basically
chemical symmetries that affect RMSD calculations.
Common automorphisms include flipping a phenyl ring (think Phe chi2)
or rotating a methyl group (or CF3, if you don't care about H).
However, they can be much more complicated than that,
and some cannot be imitated by rotation about a bond.
Examples include labeling a -CF3 clockwise vs. counterclockwise,
or swapping the -CF3 branches of -C(CF3)2R.
See the ligand of PDB 1PQC for a reasonably complex example.
Formally, a graph automorphism is an isomorphism of that graph with itself:
given a graph G(V,E) and a mapping M that relabels the vertices
according to M(v) -> v', then M is an automorphism iff
(M(u),M(v)) is an edge if and only if (u,v) is an edge.
If the vertices are "colored" (in our case, have atom types), it must also
be true that M(v) and v have the same color, for all v in V.
Thus you can re-label a phenyl ring
  2  3          6  5               6  3
1      4  or  1      4  but not  1      4
  6  5          2  3               2  5
because in the last case, there are new bonds 6-3 and 2-5,
and missing bonds 6-5 and 2-3.
See also:  OpenEye's OEChem library and its OERMSD() function.

Instance Methods [hide private]
 
__init__(...)
__init__( (object)arg1, (ResidueType)restype [, (bool)includeH=False]) -> None : Including H will lead to many, many more automorphisms!
 
__reduce__(...)
helper for pickle
 
next(...)
next( (AutomorphismIterator)arg1) -> vector1_Size : Returns the next automorphism for this residue type as a vector that maps "old" atom indices to "new" atom indices.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 32
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

__init__( (object)arg1, (ResidueType)restype [, (bool)includeH=False]) -> None :
    Including H will lead to many, many more automorphisms!
    

    C++ signature :
        void __init__(_object*,core::chemical::ResidueType [,bool=False])

__init__( (object)arg1, (AutomorphismIterator)) -> None :
    Enumerates the automorphisms of a residue, which are basically
    chemical symmetries that affect RMSD calculations.
    Common automorphisms include flipping a phenyl ring (think Phe chi2)
    or rotating a methyl group (or CF3, if you don't care about H).
    However, they can be much more complicated than that,
    and some cannot be imitated by rotation about a bond.
    Examples include labeling a -CF3 clockwise vs. counterclockwise,
    or swapping the -CF3 branches of -C(CF3)2R.
    See the ligand of PDB 1PQC for a reasonably complex example.
    Formally, a graph automorphism is an isomorphism of that graph with itself:
    given a graph G(V,E) and a mapping M that relabels the vertices
    according to M(v) -> v', then M is an automorphism iff
    (M(u),M(v)) is an edge if and only if (u,v) is an edge.
    If the vertices are "colored" (in our case, have atom types), it must also
    be true that M(v) and v have the same color, for all v in V.
    Thus you can re-label a phenyl ring
      2  3          6  5               6  3
    1      4  or  1      4  but not  1      4
      6  5          2  3               2  5
    because in the last case, there are new bonds 6-3 and 2-5,
    and missing bonds 6-5 and 2-3.
    See also:  OpenEye's OEChem library and its OERMSD() function.
    

    C++ signature :
        void __init__(_object*,core::chemical::AutomorphismIterator)

__init__( (object)arg1, (ResidueType)restype, (ResidueType)restype2 [, (bool)includeH=False]) -> None :
    The mapping returned will be from restype to restype2
    Including H will lead to many, many more automorphisms!
    

    C++ signature :
        void __init__(_object*,core::chemical::ResidueType,core::chemical::ResidueType [,bool=False])

Overrides: object.__init__

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

next(...)

 

next( (AutomorphismIterator)arg1) -> vector1_Size :
    Returns the next automorphism for this residue type
    as a vector that maps "old" atom indices to "new" atom indices.
    Returns an empty vector when no more automorphisms remain.
    

    C++ signature :
        utility::vector1<unsigned long, std::allocator<unsigned long> > next(core::chemical::AutomorphismIterator {lvalue})