regularize
index


 
Functions to modify atomic coordinates such that covalent restraints (bond,
angle, improper) are satisfied.

 
Classes
       
builtins.Exception(builtins.BaseException)
CovalentViolation

 
class CovalentViolation(builtins.Exception)
    CovalentViolation(mess)
 

 
 
Method resolution order:
CovalentViolation
builtins.Exception
builtins.BaseException
builtins.object

Methods defined here:
__init__(s, mess)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__weakref__

 
list of weak references to the object (if defined)

Static methods inherited from builtins.Exception:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
Helper for pickle.
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
add_note(...)
Exception.add_note(note) --
add a note to the exception
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__

 
exception cause
__context__

 
exception context
__dict__

 
__suppress_context__

 
__traceback__

 
args

 

 
Functions
       
addUnknownAtoms(dyn_stepsize=0.02, dyn_numStepMul=1, maxFixupIters=20, maxFastIterations=100, verbose=0, simulation=0)
Iteratively delete unknown atoms bound to unknown atoms and call
addUnknownAtoms_fast.
 
This algorithm will fail for loops of unknown atoms- and the slow
addUnknownAtoms_old routine will be called.
addUnknownAtoms_fast(verbose=0, maxFixupIters=500, simulation=0)
add in unknown atoms so that covalent and vdw terms are satisfied by
randomly placing atoms, and calling protocol.fixupCovalentGeom() to
correct the covalent geometry, using maxFixupIters as the maxIters
argument to that function.
 
This is a fast version which will only reliably work if the missing atoms
are separated by a single bond from a known atom.
 
if verbose=True, details of the minimization procedure are printed.
addUnknownAtoms_new = addUnknownAtoms(dyn_stepsize=0.02, dyn_numStepMul=1, maxFixupIters=20, maxFastIterations=100, verbose=0, simulation=0)
Iteratively delete unknown atoms bound to unknown atoms and call
addUnknownAtoms_fast.
 
This algorithm will fail for loops of unknown atoms- and the slow
addUnknownAtoms_old routine will be called.
addUnknownAtoms_old(dyn_stepsize=0.02, dyn_numStepMul=1, maxFixupIters=500, verbose=0, simulation=0)
Add unknown atoms, satisfying covalent and nonbonded terms.
 
This routine is slow, but it is rather robust.
 
dyn_stepsize specifies the timestep size during the MD phase.  Reduce this
if you have convergence problems.
 
dyn_numStepMul is a multiplier for the number of molecular dynamics steps
taken.  Increase this to get better convergence.
 
if verbose=True, details of the minimization procedure are printed.
 
This function resets the XPLOR constraints interaction settings.
covalentMinimize(sel=0, numSteps=100, dEpred=1.0)
Perform gradient optimization including only covalent terms (bonds,
angles, impropers)
 
This function resets the XPLOR constraints interaction settings.
fixupCovalentGeom(sel='known and not pseudo', useVDW=False, useDynamics=1, dynRatio=5, maxIters=40, verbose=0, maxViols=0, bondTol=0.01, angleTol=2.0, torsionTol=2.0, extraTerms=[], suppressExceptions=False)
Given the atoms in selection sel, perform, minimization and (optionally)
dynamics to remove bond, angle, and improper violations - so that their
total number is less than or equal to maxViols.
 
If useVDW is set, the nonbonded term will be used 1/4 of the time, in
combination with only the bond term. If useDynamics is set, dynamics will 
be used 1/dynRatio of the time. maxIters is the total maximum number of 
iterations.
 
Tolerances for bond, bond angle and improper torsion angles can also be
specified using optional arguments.
 
Additional pot.Pot terms to satify may be specified with the
extraTerms argument. Note that use of this argument probably will not work,
due to internal use of old XPLOR dynamics and minimization engines.
 
If this function is not successful in satisfying all covalent restraints,
it will throw the exception regularize.CovalentViolation, if
suppressExceptions is False. The structure is set to that with the
minimal number of violations, and if more than one configuration
has that number of violations, the structure with the minimal
energy is used. 
 
This function resets the XPLOR constraints interaction settings.
 
If verbose>0, intermediate status is printed. Increase verbose for more
verbosity up to a maximum value of 6.
 
The return value is a dictionary with the following keys:
 
      'numViols' - number of violations
      'viols'    - list of violations of each term, bond, angle, improper
      'coords'   - coordinates corresoponding to min numViols
fixupCovalentGeomIVM(sel='known and not PSEUDO', rigidRegions=(), translateRegions=(), useVDW=0, useDynamics=1, dynRatio=5, maxIters=40, verbose=0, maxViols=0, bondTol=0.01, angleTol=2.0, torsionTol=2.0, extraTerms=[], suppressExceptions=False)
given the atoms in selection sel, perform, minimization and (optionally)
dynamics to remove bond, angle, and improper violations - so that there
total number is less than or equal to maxViols.
 
rigidRegions is a sequence of selections which specify those regions to
move as a rigid unit.
 
translateRegions is a sequence of selections which specify those regions to
move as a rigid unit, allowing only translational motions (i.e. without
rotation).
 
If useVDW is set, the nonbonded term will be used 1/4 of the time.
if useDynamics is set, dynamics will be used 1/dynRatio of the time.
maxIters is the total maximum number of iterations.
 
tolerances for bond, bond angle and improper torsion angles can also be
specified using optional arguments.
 
Additional terms to satify may be specified with the extraTerms
argument. This should be a list of pot.Pot terms.
 
If this function is not successful in satisfying all covalent restraints,
it will throw the exception regularize.CovalentViolation, if
suppressExceptions is False. The structure is set to that with the
minimal number of violations, and if more than one configuration
has that number of violations, the structure with the minimal
energy is used.
 
This function resets the XPLOR constraints interaction settings.
 
If verbose>0, intermediate status is printed. Increase verbose for more
verbosity.
 
This function is not ensembleSimulation-thread safe, meaning that
that if it is called for one ensemble member, it must be called for all
ensemble members.
 
The return value is True unless the procedure fails, and suppressExceptions
is set to True in which case it returns False.
reduce(...)
reduce(function, iterable[, initial]) -> value
 
Apply a function of two arguments cumulatively to the items of a sequence
or iterable, from left to right, so as to reduce the iterable to a single
value.  For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
of the iterable in the calculation, and serves as a default when the
iterable is empty.