This PR adds functionalities to read Gromacs trajectory .gro files and calls to the Gromacs post processing commands trjconv and select.
Typically, binary trajectory .xtc files will need to be cleaned and processed in order to perform analysis with python code. Gromacs has some inbuilt post-processing commands that can be called from the command line. Most notably, the trjconv command can be used to amend particle coordinates that may become disrupted due to periodic boundary conditions. This is an important precursor step to calculating any property based on spatial distributions, such as cluster formation.
Additional useful routines for analysing coordinate files have also been included: molecular_positions to calculate a single coordinate representing the molecular position, distance_matrix, to calculate pairwise vector and euclidean distances between particle positions, and batch_distance_matrix, a batch implementation of distance_matrix.
Change log
Two new subclasses of type BaseGromacsCommand: Gromacs_trjconv and Gromacs_select.
New class created BaseFileReader, to act as a parent class for reader objects.
GromacsTopologyReader is now a subclass of BaseFileReader and extracts lists of atomic masses and charges, rather than the total molecular mass and charge.
New subclass of type BaseFileReader: GromacsCoordinateReader, which processes .gro files to return particle coordinates from trajectories
Fragment class has minor amendments to be able to store all atomic masses, rather than just the total molecular mass. This is important for post processing trajectory files later on, as typically the molecular centre of mass is a desirable property.
force_gromacs/tools folder contains useful functions to calculate particle pairwise distances and molecular positions from parsed trajectory file data.
Three routines added to the force_gromacs.api: molecular_positions, distance_matrix and batch_distance_matrix
This PR adds functionalities to read Gromacs trajectory
.gro
files and calls to the Gromacs post processing commandstrjconv
andselect
.Typically, binary trajectory
.xtc
files will need to be cleaned and processed in order to perform analysis with python code. Gromacs has some inbuilt post-processing commands that can be called from the command line. Most notably, thetrjconv
command can be used to amend particle coordinates that may become disrupted due to periodic boundary conditions. This is an important precursor step to calculating any property based on spatial distributions, such as cluster formation.Additional useful routines for analysing coordinate files have also been included:
molecular_positions
to calculate a single coordinate representing the molecular position,distance_matrix
, to calculate pairwise vector and euclidean distances between particle positions, andbatch_distance_matrix
, a batch implementation ofdistance_matrix
.Change log
BaseGromacsCommand
:Gromacs_trjconv
andGromacs_select
.BaseFileReader
, to act as a parent class for reader objects.GromacsTopologyReader
is now a subclass ofBaseFileReader
and extracts lists of atomic masses and charges, rather than the total molecular mass and charge.BaseFileReader
:GromacsCoordinateReader
, which processes.gro
files to return particle coordinates from trajectoriesFragment
class has minor amendments to be able to store all atomic masses, rather than just the total molecular mass. This is important for post processing trajectory files later on, as typically the molecular centre of mass is a desirable property.force_gromacs/tools
folder contains useful functions to calculate particle pairwise distances and molecular positions from parsed trajectory file data.force_gromacs.api
:molecular_positions
,distance_matrix
andbatch_distance_matrix