CVSpace
CVSpace(variables, bounded=False)
The domain of the collective variables: grid, periodicity, boundaries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variables
|
Sequence of collective variable descriptions. Each must expose
|
required | |
bounded
|
bool
|
Whether non-periodic variables have reflective boundaries. When true the
internal grid is tripled with mirrored copies on each side, and
|
False
|
gridShape
property
gridShape
Shape of the CV-space grid, slowest axis first.
numDimensions
property
numDimensions
Number of collective variables.
axisDisplacement
axisDisplacement(index, start, end)
Displacement along one axis, minimum-image if that axis is periodic.
axisGridDistances
axisGridDistances(index, centers)
Distances from each of centers to every node of one axis.
A 2-D array, one row per center, matching
gridDistances for a single center:
minimum-image on a periodic axis, whose last node repeats the first, and over
the tripled grid on a reflective axis.
axisImages
axisImages(index, value)
The images of one coordinate under the reflective walls of its axis.
value itself, plus its reflections off both walls when the space is bounded
and the axis is not periodic.
mirrorPositions returns every
combination of these per-axis images.
closestNode
closestNode(position)
Index of the grid node nearest to position, in gridShape order.
displacement
displacement(position, endpoint)
Displacement from position to endpoint, minimum-image if periodic.
endpoint
endpoint(position, displacement)
Endpoint reached from position, wrapped into the periodic domain.
foldedAxis
foldedAxis(index, values)
Fold one axis's tripled bounded profile back onto the domain, in log space.
A kernel factorizes over the CVs, and its mirror images under the reflective
walls are every combination of per-axis reflections, so folding each axis's
one-dimensional profile before the outer product gives exactly what
foldedGrid gives on the full tripled
grid, at a fraction of the cost.
foldedAxisRows
foldedAxisRows(index, values)
Fold every row of a 2-D array of log profiles.
Applies foldedAxis row by row.
foldedGrid
foldedGrid(values)
Fold a tripled bounded grid back onto the physical domain, in log space.
gridDistances
gridDistances(position)
Per-axis distances from position to every grid node.
mirrorPositions
mirrorPositions(position)
Every image of position under the reflective boundaries.
For each non-periodic dimension, reflecting a point off both walls
gives two images in addition to the point itself; the images across
every dimension combine multiplicatively (a corner sees images of
images). Unbounded spaces, or spaces with only periodic CVs, have no
images: [position] is returned unchanged.
A kernel centered at any one of these images is, by the symmetry of reflection,
exactly as far from a given query point as the original kernel is from that
point's own mirror image -- so summing a kernel's density over these images is
equivalent to summing the query point's images against the one true kernel,
which is what the tripled evaluation grid does. Used to keep
Kernel.evaluate (arbitrary points)
consistent with
Kernel.evaluateOnGrid.
periodicCopies
periodicCopies(values)
Make the last node along every periodic axis an exact copy of the first.
The two nodes are the same point. Evaluating them separately can round differently (a matrix product, for one, need not give equal columns equal sums), and OpenMM rejects a periodic table whose ends differ at all.