| distSplinePot |
index |
A splined energy term depending on the distance between two atoms. A switching
function forces the energy to zero at large distances.
Constructor
DistSplinePot(instanceName,
rValues,
eValues,
rSwitch=1,
Simulation=None )
rValues and eValues are arrays containing r values and the associented
energy values; they must have the same length.
Initially, rOn is set to the final value of rValues, and rOff is set to
rOn+rSwitch.
Methods
simulation() - return the associated simulation.Simulation.
energy(r) - return the energy associated with the specified
internuclear distance r.
dE_dr(r) - the derivative of the energy with respect to r.
sw(r) - switching function at distance r.
dsw(r) - derivative of the switching function with respect to r.
calcEnergy() - calculate and return associated energy.
addRestraint(sel0,
sel1,
comment="") - add a restraint with the specified two
atomSel.AtomSels, and an optional comment.
numRestraints() - return the number of restaints.
clearRestraints() - delete all restraints.
showViolations() - return a string with info on all violated restraints.
If showAllRestraints==True, all restraints are reported
on.
restraints() - return a list of DistSpline_Restraints, described below.
info() - return an informational string.
violations() - return the number of violations.
Member:
spline - the raw spline.Spline object which give the unswitched
function of r.
The following parameters can be set [defaults in square brackets]
rOn - the inter-nuclear distance below which the switching function
takes value 1.
rOff - the inter-nuclear distance above which the switching function
takes value 0.
aveType - used to define the distance between sel0 and sel1 when one or
both specify more than one atom. Valid values are "center", for
using the distance between the average position of each selection,
or "shortest" where the distance is computed from those
two atoms which are closest together. ["center"]
violEnergy - Energy above which a restraint is considered to be
violated. [0]
showAllRestraints - Controls printing of restraints during analysis. If
False, only violated restraints are printed. [True]
the above quantities may be retrieved using the member function form
quantity(), while they are set using the form setQuantity(value).
DistSpline_Restraint Class
Methods
energy() - associated energy
violated() - the restraint is considered to be violated if
energy()-pot.violEnergy() > pot.threshold().
Members:
comment - string given with addRestraint
sel0 - these are the atomSel.AtomSel objects created from the
sel1 - associated call to addRestraint.
dist - the distance between atom selections.
dv - a unit vector in the direction q0-q1, where q0 and q1 are computed
from sel0 and sel1, respectively.
atom0 - for "shortest" aveType, these are the two atoms corresponding to the
atom1 - shortest distance.
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
| Classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||
| ||
| Data | ||
| PERIODIC_NOT = 0 PERIODIC_X = 1 PERIODIC_Y = 2 | ||