ProtoCaller.Wrappers.parmedwrapper module

This module provides some functions on top of ParmEd which handle system box resizing and centering and some high-level wrappers which are responsible for calling ParmEd’s read/write parsers.

ProtoCaller.Wrappers.parmedwrapper.centre(system, box_length)

Centres the system given a box length.

Parameters
  • system (parmed.structure.Structure) – The input system to be centred.

  • box_length (float, iterable) – Length of the box.

Returns

  • system (parmed.structure.Structure) – The centred ParmEd system.

  • box_length (tuple) – The new box length. Only different from the input value if the box is too small for the system.

  • translation_vec (numpy.ndarray) – The centering translation vector.

ProtoCaller.Wrappers.parmedwrapper.fixCharge(filelist)

Makes sure that the net charge is always an integer up to a float precision.

Parameters

filelist ([str]) – An array of input files.

Returns

filelist – An array of fixed output files.

Return type

[str]

ProtoCaller.Wrappers.parmedwrapper.openFilesAsParmed(filelist, **kwargs)

Opens an input file list and returns a ParmEd Structure.

Parameters
  • filename (str, list) – The name of the input file.

  • kwargs – Keyword arguments to be supplied to parmed.load_file.

Returns

mol – The file loaded as a ParmEd Structure object.

Return type

parmed.structure.Structure

ProtoCaller.Wrappers.parmedwrapper.resize(system, box_length)

Changes the box size of the system or adds one if there is no box.

Parameters
  • system (parmed.structure.Structure) – The input system to be resized.

  • box_length (float, iterable) – Length of the box.

Returns

system – The resized system.

Return type

parmed.structure.Structure

ProtoCaller.Wrappers.parmedwrapper.saveFilesFromParmed(system, filelist, overwrite=True, **kwargs)

Saves a ParmEd Structure object to a file.

Parameters
  • system (parmed.structure.Structure) – The input system.

  • filelist (str, [str]) – The names of the output files.

  • overwrite (bool) – Whether to overwrite existing files.

  • kwargs – Additional arguments to be pased on to save()

Returns

saved_files – The absolute path to the written files.

Return type

[str]