Package schrodinger :: Package application :: Package desmond :: Package packages :: Module traj
[hide private]
[frames] | no frames]

Module traj

Molecular dynamics trajectory handling module Define common APIs for various trajectory formats. Basic trajectory handling algorithms are also implemented here.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Source
  DtrSource
  Frame
This class, as its name suggests, represents a single trajectory frame.
Functions [hide private]
 
_newid()
Ensurance: All IDs issued by this function are unique integer numbers > -1.
 
read_traj(inp, format='dtr')
 
write_traj(tr, fname, format='dtr')
 
merge(*arg)
Merge a list of trajectories.
 
concat(first_time, delta_time, *arg)
Concatenate a list of trajectories and reassign the chemical time for each frame.
list
extract_subsystem(tr, gids)
Extract the subsystem as specified by the gids for each frame in the given trajectory tr, and return a new trajectory for the subsystem.
list of frame
dehydrate(tr, solute_gids, water_gids_per_frame)
This function retains the GIDs of the solute atoms and the specified waters atoms, effectively removing the majority of the bulk waters from the trajectory.
Variables [hide private]
  _id_count = 0
hash(x)
  __package__ = 'schrodinger.application.desmond.packages'
Function Details [hide private]

write_traj(tr, fname, format='dtr')

 
Parameters:
  • fname (str) - Output file name
  • format (str) - Trajectory file format. Valid values: "dtr"

merge(*arg)

 

Merge a list of trajectories. If there is any overlapped frames among these trajectories, the ones from the latter trajectory (higher index in the arg list) will be kept.

concat(first_time, delta_time, *arg)

 

Concatenate a list of trajectories and reassign the chemical time for each frame.

Parameters:
  • first_time (float) - Chemical time of the first frame.
  • delta_time (float) - The chemical time interval between two successive frames.

extract_subsystem(tr, gids)

 

Extract the subsystem as specified by the gids for each frame in the given trajectory tr, and return a new trajectory for the subsystem. The original trajectory is not mutated in any way by this function.

Parameters:
  • tr (list of Frame) - Original trajectory
  • gids (list of ints) - A list of gids that specifies the subsystem.
Returns: list
A new trajectory for the subsystem

dehydrate(tr, solute_gids, water_gids_per_frame)

 

This function retains the GIDs of the solute atoms and the specified waters atoms, effectively removing the majority of the bulk waters from the trajectory.

Parameters:
  • tr (list of Frame) - Input trajectory
  • solute_gids (list of ints) - A list of gids that specifies the subsystem.
  • water_gids_per_frame (list of lists of ints) - A list of gids that specifies the subsystem.
Returns: list of frame
A new, 'dehydrated' trajectory