aWeights |
index |
Population occupancy weights encoded as bond angles
AWeights allows optimizing ensemble weights for calculations
including ensWeights.EnsWeights.
Constructor:
AWeights(members,
bondAngles,
derivedSpecs,
simulation) - The members argument is a list of
integers which identifies which ensemble
members are to have their weights
controlled by this object. Multiple
AWeights objects can be simultaneously
active to describe different
subpopulations of ensemble members. The bondAngles
argument is a sequence of bondAngle.BondAngle
involving pseudoatoms. The size of the bondAngles
argument must be len(members)-1.
The weights of one or more ensemble
members can be dependent on others using the
optional derivedSpecs argument: a list of tuples
with three arguments each. For an
ensemble with Ne members, Ne_base = Ne -
len(derivedSpecs), and the populations of
the first Ne_base members are
independent. The populations of the
dependent (derived) wieghts is
w = A * w_b + w_b^T * B * w_b
The first entry should be a nonnegative integer
less than Ne (this argument may disappear). The
second gives the nonzero members of the A vector
in the equation above in the form [index, value].
The third entry gives the nonzero values of the B
matrix in the form [index1, index2, value].
The final Simulation argument is optional.
Methods:
simulation() - return the associated simulation.Simulation.
weights() - return a map of (member index,weight).
setWeights(map) - set ensemble weights to specified values. This
will modify pseudoatom coordinates. The map
must have the same keys as specified by the
members argument of the constructor which specify
the identities of the ensemble members. The
minimum settable weight is 1e-7.
setWeights(list) - in this version, the list must be the full size
of the ensemble
baseWeights() - return a sequence of base weights - that is
weights not specified by derivedSpecs.
derivedSpecs () - return the derivedSpecs argument given in the
constructor.
minFrac - the fraction of 1/Ne
corresponding to the minimal allowed
weight. For instance, if minFrac=0.1,
wMin would be 0.1/Ne. Default: 0.
setMinFrac(val) - set the minFrac value.
members() - return a list of indices which identify the
ensemble members for which this object sets
weights.
setAngles(vals); - pass a list of bondAngle.BondAngle objects
which contain the identity of pseudoatoms. The
number of angles must be len(baseWeights())-1.
angles() - return a list of bondAngle.BondAngle objects
which are used to encode ensemble weights.
freedom() - return the freedom specification.
setFreedom(string) - set the freedom specification. This is
queried by ensWeightsTools.topologySetup()
to correctly handle the IVM setup for
pseudoatoms. Valid values are "vary",
"fix", "ignore". This should usually be left
at the default value of "vary". The value of
"bend" is equivalent to "vary".
computeWeights(modified) - recompute ensemble weights from pseudoatom
positions. Chose a modified argument value of
True.
weightsFromAngles(angles,
minFrac=0)- given a list of angle values (in radians),
compute the values of the baseWeights
member, taking into account the value of
minFrac. Note that
len(angles) = len(baseWeights)-1
Returned is a sequence of the complete
list of weights.
info() - return a string describing the current state of the object.
These weights (occupancy fractions) take values between wMin and wMax (which
is 1-wMin), such that their sum is unity. wMin can be given a nonzero value
using the setMinFrac accessor.
# 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 | ||
|