atomAction
index
/home/schwitrs/xplor/python/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)
    PrintPos(otherCoords=0)
 
print position of atoms in selection
 
 
Method resolution order:
PrintPos
atomSelAction.PyAtomSelAction
atomSelAction.Base
builtins.object

Methods defined here:
__init__(s, otherCoords=0)
Initialize self.  See help(type(self)) for accurate signature.
init(s, sel)
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__repr__ = _swig_repr(self)
pyXplorHelp(self, *args, **kwargs) -> 'String'

Static methods inherited from atomSelAction.PyAtomSelAction:
__swig_destroy__ = delete_PyAtomSelAction(...)

Data descriptors inherited from atomSelAction.PyAtomSelAction:
thisown

 
The membership flag

Methods inherited from atomSelAction.Base:
finish_unused(self, *args, **kwargs) -> 'void'
init_unused(self, *args, **kwargs) -> 'void'

Data descriptors inherited from atomSelAction.Base:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

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

Methods defined here:
__init__(s, temperature)
Initialize self.  See help(type(self)) for accurate signature.
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__repr__ = _swig_repr(self)
pyXplorHelp(self, *args, **kwargs) -> 'String'

Static methods inherited from atomSelAction.PyAtomSelAction:
__swig_destroy__ = delete_PyAtomSelAction(...)

Data descriptors inherited from atomSelAction.PyAtomSelAction:
thisown

 
The membership flag

Methods inherited from atomSelAction.Base:
finish_unused(self, *args, **kwargs) -> 'void'
init_unused(self, *args, **kwargs) -> 'void'

Data descriptors inherited from atomSelAction.Base:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class SetPropertyArr(atomSelAction.PyAtomSelAction)
    SetPropertyArr(name, val)
 
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
builtins.object

Methods defined here:
__init__(s, name, val)
Initialize self.  See help(type(self)) for accurate signature.
run(s, sim, index)

Methods inherited from atomSelAction.PyAtomSelAction:
__repr__ = _swig_repr(self)
pyXplorHelp(self, *args, **kwargs) -> 'String'

Static methods inherited from atomSelAction.PyAtomSelAction:
__swig_destroy__ = delete_PyAtomSelAction(...)

Data descriptors inherited from atomSelAction.PyAtomSelAction:
thisown

 
The membership flag

Methods inherited from atomSelAction.Base:
finish_unused(self, *args, **kwargs) -> 'void'
init_unused(self, *args, **kwargs) -> 'void'

Data descriptors inherited from atomSelAction.Base:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class TranslateFit(atomSelAction.PyAtomSelAction)
    TranslateFit(fitCoords, fitSel=0)
 
translate atom positions to best-fit coordinates specified by fitCoords.
fitCoords must have size sim.numAtoms()
 
 
Method resolution order:
TranslateFit
atomSelAction.PyAtomSelAction
atomSelAction.Base
builtins.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:
__repr__ = _swig_repr(self)
pyXplorHelp(self, *args, **kwargs) -> 'String'

Static methods inherited from atomSelAction.PyAtomSelAction:
__swig_destroy__ = delete_PyAtomSelAction(...)

Data descriptors inherited from atomSelAction.PyAtomSelAction:
thisown

 
The membership flag

Methods inherited from atomSelAction.Base:
finish_unused(self, *args, **kwargs) -> 'void'
init_unused(self, *args, **kwargs) -> 'void'

Data descriptors inherited from atomSelAction.Base:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
centerOfMass(sel='not PSEUDO', useMass=True)
Return the center of mass of the specified atoms.
 
The returned object is a vec3.Vec3 instance representing the center of
mass (if useMass is True) or centroid (if useMass is False) of the atoms
specified by the argument sel.  sel can be either an atom selection string
or an atomSel.AtomSel instance.
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.
genRandomCoords(selection='not pseudo', xyzInterval=10.0)
Assign atoms in the specified atom selection random x,y,z, coordinates in the
interval -xyzInterval .. +xyzInterval.
getProperty(name, sel)
get array corresponding to the named property for the given selection.
mass(selection='not PSEUDO')
Return the mass of the specified atomSel.AtomSel.
maxwellDist(temperature, factor)
randomizeDomainPos(sel, deltaPos=20, deltaAngle=3.141592653589793, centerSel=None)
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.
 
The deltaAngle parameter specifies the maximal +/- angle (in radians) to
rotate. 
 
If centerSel is specified, atoms in sel at first centered around the average
position of centerSel before rotation/translation.
randomizeVelocities(temperature, sel='known')
randomize atomic velocities according to a Maxwell distribution
corresponding to the given temperature. The default selection
contains all known atoms.
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.

 
Data
        pi = 3.141592653589793