parmed.namd.namdbinfiles module¶
This module contains classes for reading and writing (single frame) NAMD binary files. The main functionality is currently aimed at manipulation rather than analysis.
-
class
parmed.namd.namdbinfiles.NamdBinCoor(values=[])[source]¶ Bases:
parmed.namd.namdbinfiles.NamdBinFileClass to read or write NAMD “bincoordinates” files.
- Attributes
- coordinates
natomThe current number of atom entries.
Methods
copyatoms(start_index, natoms)Convenience function, same as insertatoms() but set ‘values’ to be the same as the previous natoms’ values (i.e.
delatoms(indices)Delete entries corresponding to the given atom indices.
insertatoms(start_index, natoms[, values])Insert space for natom entries beginning at start_index.
read(fname)Return an object from the values in a NAMD binary file.
write(fname)Write the current attributes to a file.
-
property
coordinates¶
-
class
parmed.namd.namdbinfiles.NamdBinFile(values=[])[source]¶ Bases:
objectFrom the NAMD manual:
NAMD uses a trivial double-precision binary file format for coordinates, velocities, and forces … The file consists of the atom count as a 32-bit integer followed by all three position or velocity components for each atom as 64-bit double-precision floating point …
The main attributes are the number of atom entries (natom) and a (flat) numpy array of size 3*natom (values). The meaning of “values” is effectively arbitrary, but for convenience derived classes are provided which alias the values to more descriptive names (e.g. “coordinates”).
See also
- Attributes
natomThe current number of atom entries.
Methods
copyatoms(start_index, natoms)Convenience function, same as insertatoms() but set ‘values’ to be the same as the previous natoms’ values (i.e.
delatoms(indices)Delete entries corresponding to the given atom indices.
insertatoms(start_index, natoms[, values])Insert space for natom entries beginning at start_index.
read(fname)Return an object from the values in a NAMD binary file.
write(fname)Write the current attributes to a file.
-
copyatoms(start_index, natoms)[source]¶ Convenience function, same as insertatoms() but set ‘values’ to be the same as the previous natoms’ values (i.e. make a copy of them).
-
insertatoms(start_index, natoms, values=None)[source]¶ Insert space for natom entries beginning at start_index. If specified, give them the provided values, otherwise set them to zero.
-
property
natom¶ The current number of atom entries.
-
class
parmed.namd.namdbinfiles.NamdBinVel(values=[])[source]¶ Bases:
parmed.namd.namdbinfiles.NamdBinFileClass to read or write NAMD “binvelocities” files.
- Attributes
natomThe current number of atom entries.
- velocities
Methods
copyatoms(start_index, natoms)Convenience function, same as insertatoms() but set ‘values’ to be the same as the previous natoms’ values (i.e.
delatoms(indices)Delete entries corresponding to the given atom indices.
insertatoms(start_index, natoms[, values])Insert space for natom entries beginning at start_index.
read(fname)Return an object from the values in a NAMD binary file.
write(fname)Write the current attributes to a file.
-
property
velocities¶