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)

Bases: object

This a minimum interface to allow pfx functions for cms.Cms object.

__init__(cms)
box: numpy.array = None
natoms: int = 0
nactive: int = 0
pos()
vel()
schrodinger.application.desmond.packages.pfx.make_whole(topo, tr)

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.

Parameters
  • topo (List[List[int]], usually cms.Cms.glued_topology) – Lists of particles connected to each of the particles in trajectory

  • tr (list) – The simulation trajectory to be modified

Return type

list

Returns

Modified simulation trajectory

schrodinger.application.desmond.packages.pfx.glue(topo, gids, tr)

Given topology (topo), glue gids together 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 to be glued

  • tr (List[traj.Frame]) – Simulation trajectory to be modified

Return type

List

Returns

Modified simulation trajectory

schrodinger.application.desmond.packages.pfx.center(topo, gids, tr, dims=None)

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

List

Returns

Modified simulation trajectory

schrodinger.application.desmond.packages.pfx.superimpose(topo, gids, tr, ref_pos, weights=None)

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

  • weigths (List or None) – weights for each particle in gids

Return type

List

Returns

Modified trajectory

schrodinger.application.desmond.packages.pfx.make_whole_cms(cms_model)

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)

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)

Similar to center (see above), but on a cms model instead of a simulation trajectory.

Parameters

dim (None or list of int, e.g., [2] for z axis, [0, 1] for x-y plane. If set to None, 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)

Similar to superimpose (see above), but on a cms model instead of a simulation trajectory.

Return type

cms.Cms

Returns

Modified cms model