atomAction
index
atomAction.py


Perform some action on an AtomSel. Available actions are the following
functions
   randomizeDomainPos
   randomizeVelocities
   translateFit
 
 and the following classes
   PrintPos
   SetProperty
   RandomizeVelocities
   TranslateFit
 
   The classes are used like
   AtomSel("name C").apply(PrintPos())
 
   or
   AtomSel("resname GLY").apply(SetProperty("residueName","G"))

 
Classes
       
atomSelAction.PyAtomSelAction(atomSelAction.Base)
PrintPos
RandomizeVelocities
SetPropertyArr
TranslateFit

 
class PrintPos(atomSelAction.PyAtomSelAction)
    print position of atoms in selection
 
 
Method resolution order:
PrintPos
atomSelAction.PyAtomSelAction
atomSelAction.Base
__builtin__.object

Methods defined here:
__init__(s, otherCoords=0)
init(s, sel)
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__del__(self, destroy=<built-in function delete_PyAtomSelAction>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
help(*args)

Data and other attributes inherited from atomSelAction.PyAtomSelAction:
__swig_getmethods__ = {}
__swig_setmethods__ = {}

Methods inherited from atomSelAction.Base:
finish_unused(*args)
init_unused(*args)

Data and other attributes inherited from atomSelAction.Base:
__dict__ = <dictproxy object at 0xd73f30>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Base' objects>
list of weak references to the object (if defined)

 
class RandomizeVelocities(atomSelAction.PyAtomSelAction)
    randomize atomic velocities according to a Maxwell distribution
    corresponding to the given temperature.     
 
 
Method resolution order:
RandomizeVelocities
atomSelAction.PyAtomSelAction
atomSelAction.Base
__builtin__.object

Methods defined here:
__init__(s, temperature)
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__del__(self, destroy=<built-in function delete_PyAtomSelAction>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
help(*args)

Data and other attributes inherited from atomSelAction.PyAtomSelAction:
__swig_getmethods__ = {}
__swig_setmethods__ = {}

Methods inherited from atomSelAction.Base:
finish_unused(*args)
init_unused(*args)

Data and other attributes inherited from atomSelAction.Base:
__dict__ = <dictproxy object at 0xd73de0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Base' objects>
list of weak references to the object (if defined)

 
class SetPropertyArr(atomSelAction.PyAtomSelAction)
    set named property of all atom.Atoms in a selection
    usage:
    sel = AtomSel("string")
    sel.apply(SetProperty(name,val)
    where
      name is a property of an atom (e.g. pos) and val is the value to set
      that property. If val is an sequence of length len(sel), values will be
      set appropriately.
 
    atomSelAction.SetProperty is an optimized version of this class which
    allows atom properties top be set to a constant value.
    
 
 
Method resolution order:
SetPropertyArr
atomSelAction.PyAtomSelAction
atomSelAction.Base
__builtin__.object

Methods defined here:
__init__(s, name, val)
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__del__(self, destroy=<built-in function delete_PyAtomSelAction>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
help(*args)

Data and other attributes inherited from atomSelAction.PyAtomSelAction:
__swig_getmethods__ = {}
__swig_setmethods__ = {}

Methods inherited from atomSelAction.Base:
finish_unused(*args)
init_unused(*args)

Data and other attributes inherited from atomSelAction.Base:
__dict__ = <dictproxy object at 0xd73e18>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Base' objects>
list of weak references to the object (if defined)

 
class TranslateFit(atomSelAction.PyAtomSelAction)
    translate atom positions to best-fit coordinates specified by fitCoords.
    fitCoords must have size sim.numAtoms()
 
 
Method resolution order:
TranslateFit
atomSelAction.PyAtomSelAction
atomSelAction.Base
__builtin__.object

Methods defined here:
__init__(s, fitCoords, fitSel=0)

        fitCoords- coordinates to use for fitting.
        fitSel   - subset of atoms to use in calculating fit (default: known)
 
        After construction, the fit is calculated and stored in member trans.
        
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__del__(self, destroy=<built-in function delete_PyAtomSelAction>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
help(*args)

Data and other attributes inherited from atomSelAction.PyAtomSelAction:
__swig_getmethods__ = {}
__swig_setmethods__ = {}

Methods inherited from atomSelAction.Base:
finish_unused(*args)
init_unused(*args)

Data and other attributes inherited from atomSelAction.Base:
__dict__ = <dictproxy object at 0xd73ef8>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Base' objects>
list of weak references to the object (if defined)

 
Functions
       
centerOfMass(sel)

    return the center of mass of the given atom selection.
    
copyAtomCoords(sel1, sel2)
 copy atomic coordinates from sel2 to sel1.
    The two selections must contain the same number of atoms. This is most
    useful for copying coordinates between segments or between separate
    simulation.Simulations. The two selections must contain the same number
    of atoms.
 
    The current implementation requires that identical ordering of the atoms
    in the two selections, but there may be gaps.
    
getProperty(name, sel)

    get array corresponding to the named property for the given selection.
    
maxwellDist(temperature, factor)
randomizeDomainPos(sel, deltaPos=20)

    Randomly rotate and translate the given atom selection, 
    as a rigid-body about its center of mass.
 
    The deltaPos parameter specifies the maximum displacement to apply
    
randomizeVelocities(temperature, sel=())

    randomize atomic velocities according to a Maxwell distribution
    corresponding to the given temperature. The default selection
    contains all known atoms. 
    
sqrt(...)
sqrt(x)
 
Return the square root of x.
translateFit(fitCoords, atomSel=0)
Return array of atom positions which best-fit coordinates
    specified by fitCoords. fitCoords must have size sim.numAtoms()
    This routine does not change the current coordinates.
    the default atomSel is known atoms.
    
world = SimulationWorld_world(...)