Package schrodinger :: Package application :: Package matsci :: Module enumeration :: Class ElementAlchemist
[hide private]
[frames] | no frames]

Class ElementAlchemist

    object --+        
             |        
     Alchemist --+    
                 |    
StructureAlchemist --+
                     |
                    ElementAlchemist


An alchemist class that transmutes elements in a Structure

@note: The new_items argument to the constructor for this class should have
the following format:
    type new_items: list of tuple
    param new_items: Each item of the list is an (element, color) tuple,
    where element is the atomic symbol of the element to mutate to, and
    color is the new color for that atom in a form accepted by the
    _StructAtom.color property

Instance Methods [hide private]
schrodinger.structure.Structure
performTransmutation(self, struct, index, item)
Perform a transmutation on a copy of struct at index.
 
fixHydrogens(self, struct, used)
Correct the number of hydrogens bonded to each transmuted atom
 
allTransmutationsCompleted(self, struct, used)
All transmutations have been performed on struct, write it out to a file if we are keeping this result

Inherited from StructureAlchemist: __init__, runTransmutations

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

performTransmutation(self, struct, index, item)

 

Perform a transmutation on a copy of struct at index. It is very important that this happen on a copy of struct, not struct itself.

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to transmute a copy of
  • index (int) - An index that tells what atom to transmute
  • item (tuple) - An (element, color) tuple, where element is the atomic symbol of the element to mutate to, and color is the new color for that atom in a form accepted by the _StructAtom.color property
Returns: schrodinger.structure.Structure
A COPY of struct with atom index transmuted
Overrides: Alchemist.performTransmutation

fixHydrogens(self, struct, used)

 

Correct the number of hydrogens bonded to each transmuted atom

Parameters:

allTransmutationsCompleted(self, struct, used)

 

All transmutations have been performed on struct, write it out to a file if we are keeping this result

Parameters:
Overrides: Alchemist.allTransmutationsCompleted