amber/md format#

Aliases#

amber/md

Implementation: AmberMDFormat

Overview#

AMBER molecular-dynamics trajectory and label files.

AMBER is a suite of biomolecular simulation programs for molecular dynamics simulations and analysis.

Coordinates and topology are read from .nc and .parm7 files. Labeled loading additionally requires the .mdfrc force trajectory and takes energies from either the .mden or the .mdout file. The parmed optional dependency is required.

Quick examples#

The examples use the preferred alias amber/md; any alias listed above is equivalent.

import dpdata

# Geometry-only data
system = dpdata.System("trajectory_prefix", fmt="amber/md")

# Data with energies and forces
labeled_system = dpdata.LabeledSystem("trajectory_prefix", fmt="amber/md")

Conversions#

Convert from this format to System#

dpdata.System(file_name=None, parm7_file=None, nc_file=None, use_element_symbols=None, fmt: Literal['amber/md'] = None, **kwargs) → dpdata.system.System
dpdata.System.from_amber_md(file_name=None, parm7_file=None, nc_file=None, use_element_symbols=None, **kwargs) → dpdata.system.System

Load an unlabeled AMBER trajectory.

Parameters:
file_namestr, optional

Common prefix used to infer <prefix>.parm7 and <prefix>.nc.

parm7_filestr, optional

Explicit AMBER topology file. Overrides the inferred path.

nc_filestr, optional

Explicit NetCDF trajectory file. Overrides the inferred path.

use_element_symbolslist[int] or str, optional

Atoms whose element symbols are used instead of AMBER atom types, given either as a list of atom indexes or as an AMBER mask string selecting them.

**kwargsdict

Additional format arguments accepted for API compatibility.

Returns:
System

converted system

Convert from this format to LabeledSystem#

dpdata.LabeledSystem(file_name=None, parm7_file=None, nc_file=None, mdfrc_file=None, mden_file=None, mdout_file=None, use_element_symbols=None, fmt: Literal['amber/md'] = None, **kwargs) → dpdata.system.LabeledSystem
dpdata.LabeledSystem.from_amber_md(file_name=None, parm7_file=None, nc_file=None, mdfrc_file=None, mden_file=None, mdout_file=None, use_element_symbols=None, **kwargs) → dpdata.system.LabeledSystem

Load a labeled AMBER trajectory.

Parameters:
file_namestr, optional

Common prefix used to infer the AMBER file names.

parm7_filestr, optional

Explicit AMBER topology file.

nc_filestr, optional

Explicit NetCDF coordinate trajectory.

mdfrc_filestr, optional

Explicit force trajectory. Required for labeled loading; inferred from file_name when not given.

mden_filestr, optional

Explicit energy file. Used when present, otherwise mdout_file supplies the energies.

mdout_filestr, optional

Explicit AMBER text output. Fallback energy source when mden_file is absent.

use_element_symbolslist[int] or str, optional

Atoms whose element symbols are used instead of AMBER atom types, given either as a list of atom indexes or as an AMBER mask string selecting them.

**kwargsdict

Additional format arguments accepted for API compatibility.

Returns:
LabeledSystem

converted system