Estimate frame and average density in a Discovery Studio trajectory

Currently when analyzing a molecular dynamics run using PBC initiated by Discovery Studio  the Cell size and density is in the CHARMm log file but not the NAMD log file.

Therefore at present it might be useful to estimate the box size and density from the coordinates themselves.  This is what the script "findCellSize.pl"  does.

Limitations:  This script assumes orthoganal PBC cells of 90 deg.

NOTE, I have now also include a script that extracts the cell size (and density) from a CHARMm.log if you have one.  That script is FindCellSizeInCHARMMlog.pl

Each zip contains sample data.

Notes for "findCellSize.pl"

Since most molecular dynamics compute engines perform reimaging the content of a PBC cell will typically have some atoms that extend beyond the actual PBC cell boundaries leading to errors in the estimate of the cell dimensions.  Assuming that reimaging is done based on residues (as long as one atom of a residue is still in the box that residue is not reimaged), it is possible to correct this on average in a reasonable way if the box is large and there are a sufficient number of frames.  In this script the correction distance is an adjustable parameter.

This Discovery Script is intended to be run from Discovery Studio.   It requires that a molecule with a trajectory has been loaded and that the trajectory has been displayed (for example by using Structure/Animation/Play).

This script itself must be run from a Discovery Studio Script window since (as written) the results are displayed ONLY in the Output view of the Script window.

All output are in units of  angstrom, angstroms^3 or number of atoms unless otherwise specified.

**  When at all possible always obtain the box size from  the CHARMm log file or the NAMD DCD file this removes the necessity to estimate and will improve accuracy!

Current revison: 2014-jun-6    the script "findCellSize.pl"  now includes estimated density calc.

Message was edited by: Ken Butenhof  --- added findCellSizeInCHARMMlog for use when you DO have a CHARMm log file.

Notes for FindCellSizeInCHARMMlog are in the next message.