Package schrodinger :: Package trajectory :: Module rdf
[hide private]
[frames] | no frames]

Module rdf

Classes [hide private]
  RDFException
Functions [hide private]
 
write_error(msg)
Writes out an error message
 
get_mass(st, idx)
 
get_idx(st, asl, use_com)
gets atom indices from asl selection
 
get_coords_and_box(st, trj, idx1, idx2, frame_start, frame_end, com1, com2, mass1, mass2)
read the trajectory, extract the coordinates of indeces from sel1 and sel2, and the box dimensions.
 
get_xyz_from_frame(frame, atom_list, com, mass)
 
flip_xyz_for_fortran(orig_xyz)
 
flip_box_for_fortran(orig_xyz)
 
calc_rdf(xyz1, xyz2, box, rmax, dr)
Calculates the radial distirbution function (RDF or g(r)) over the trajectory the inputs are: coordinates, box information, number of particles, and frames.
 
main(argv, stdout=False)
Variables [hide private]
  __doc__ = ...
  _version = '$Revision: 0.2 $'
Function Details [hide private]

write_error(msg)

 

Writes out an error message

Parameters:
  • msg (str) - message to write out

get_idx(st, asl, use_com)

 

gets atom indices from asl selection

Parameters:
  • st (structure) - structure object
  • asl (str) - asl string
  • use_com (boolion) - to use COM if atoms are on the same molecule

get_coords_and_box(st, trj, idx1, idx2, frame_start, frame_end, com1, com2, mass1, mass2)

 

read the trajectory, extract the coordinates of indeces from sel1 and sel2, and the box dimensions. Return an numpy array of coordinates (natoms,3); a box dimensions (nframes,3); and number of frames -- nframes.

Parameters:
  • st (structure) - structure object
  • trj (str) - trajectory path
  • idx1 (list) - list of indeces in selection1
  • idx2 (list) - list of indeces in selection2
  • frame_start (int) - starting frame
  • frame_end (int) - ending frame
  • com1 (bool) - if get COM of sel1
  • com2 (bool) - if get COM of sel2
  • mass1 (list) - list of atom masses, for CoM calculations
  • mass2 (list) - list of atom masses, for CoM calculations

calc_rdf(xyz1, xyz2, box, rmax, dr)

 

Calculates the radial distirbution function (RDF or g(r)) over the
trajectory the inputs are: coordinates, box information, number of
particles, and frames.  The user also provides the histogram parameters to
be returned.
@type xyz1:     list
@param xyz1     float list of coordinates for sel1 with shape(nframes,
                natoms,3)
@type xyz2:     list
@param xyz2     float list of coordinates for sel2 with shape(nframes,
                natoms,3)
@type box:      list
@param box:     float list of box dimension for each frame, with shape(
                nframes,3)
@type rmax:     float
@param rmax:    the histogram's maximum value
@type dr:       float
@param dr:      the histogram's bin size


Variables Details [hide private]

__doc__

Value:
"""
This script will launch a Radial Distribution Function (RDF or g(r) or\
 gofr)
calculation.  The input are: -out.cms, trajectory file, and one or two\
 atom
selections.  The outputs are a simple key-value list.

Written by Dmitry Lupyan
...