velParser

Classes

class velParser.NAMDVEL(parent, velFile=None)

This class contains methods for velocity file analysis.

Parameters:
  • parent – a parent class, usually a Dataset instance It is used to compute kinetic energy for instance, by extracting atom masses for a loaded .psf file located in Dataset.
  • velFile – the velocity file to be loaded
getKineticEnergyDistribution(selection='all', binSize=0.1)

This method can be used to compute the kinetic energy distribution without plotting it. This method requires a .psf to be loaded to have access to atom masses

Parameters:
  • selection – atom selection from psf data
  • binSize – the size of the bin
Returns:

numpy 2D array containing the bin mean value (first column) and the corresponding density (second column)

plotKineticEnergyDistribution(selection='all', binSize=0.1, fit=False, model=None, p0=None)

This method calls pylab’s hist method is used to plot the distribution. This method requires a .psf to be loaded to have access to atom masses

Parameters:
  • binSize – the size of the bin. Determine the width of each rectangle of the histogram
  • fit – if set to True, use the given model in Scipy curve_fit method and plot it
  • model – model to be used for the fit, using Scipy curve_fit
  • p0 – starting parameter(s) for fitting