schrodinger.application.desmond.packages.pfx module¶
Periodic boundary condition related functions. These functions use particle connection maintained by cms.Cms (cms.Cms.glued_topology) for coordinates transformation.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.desmond.packages.pfx.Frame(cms)[source]¶
Bases:
object
This a minimum interface to allow pfx functions for cms.Cms object.
- box: numpy.array = None¶
- natoms: int = 0¶
- nactive: int = 0¶
- schrodinger.application.desmond.packages.pfx.make_whole(topo, tr)[source]¶
In MD simulation, molecules can be broken due to the periodic boundary condition, which makes some atoms be at one side of the simulation box and the other atoms at the opposite side. This function will edit the atom coordinates so to make broken molecules whole again for each frame of the MD trajectory
tr
.
- schrodinger.application.desmond.packages.pfx.glue(topo, gids, tr)[source]¶
Given topology (topo), glue gids together for each frames of trajectory (tr).
- schrodinger.application.desmond.packages.pfx.center(topo, gids, tr, dims=None)[source]¶
Given topology (topo), center around gids for each frames of trajectory (tr).
- Parameters
topo (List[List[int]]) – Lists of particles connected to each of the particles in trajectory
gids (List[int]) – List of particle ids
tr (List[traj.Frame]) – simulation trajectory to be modified
dims (Set[int]) – Dimensions to be centered on
- Return type
- Returns
Modified simulation trajectory
- schrodinger.application.desmond.packages.pfx.superimpose(topo, gids, tr, ref_pos, weights=None)[source]¶
Given topology (topo), superimpose gids for each frames of trajectory (tr) to ref_pos.
- Parameters
topo (List[List[int]]) – Lists of particles connected to each of the particles in trajectory
gids (List[int]) – List of particle ids
tr (List[traj.Frame]) – Trajectory to be modified
ref_pos (numpy.array, 3xlen(gids) matrix) – reference positions
- Return type
- Returns
Modified trajectory
- schrodinger.application.desmond.packages.pfx.make_whole_cms(cms_model)[source]¶
Similar to
make_whole
(see above), but on a cms model instead of a simulation trajectory.- Return type
cms.Cms
- Returns
Modified cms model
- schrodinger.application.desmond.packages.pfx.glue_cms(gids, cms_model)[source]¶
Similar to
glue
(see above), but on a cms model instead of a simulation trajectory.- Return type
cms.Cms
- Returns
Modified cms model
- schrodinger.application.desmond.packages.pfx.center_cms(gids, cms_model, dims=None)[source]¶
Similar to
center
(see above), but on a cms model instead of a simulation trajectory.- Parameters
dim (
None
orlist
ofint
, e.g., [2] for z axis, [0, 1] for x-y plane. If set toNone
, center on all three spatial dimensions) – dimensions to be centered on- Return type
cms.Cms
- Returns
Modified cms model
- schrodinger.application.desmond.packages.pfx.superimpose_cms(gids, cms_model, ref_pos, weights=None)[source]¶
Similar to
superimpose
(see above), but on a cms model instead of a simulation trajectory.- Return type
cms.Cms
- Returns
Modified cms model