parmed.openmm.xmlfile module¶
XML file parsing utilities for OpenMM serialized objects
-
class
parmed.openmm.xmlfile.
XmlFile
[source]¶ Bases:
object
Wrapper for parsing OpenMM-serialized objects. Supports serialized State, System, Integrator, and ForceField objects.
Methods
id_format
(filename)Identifies the file type as an XML file
parse
(*args, **kwargs)Parses XML file and returns deserialized object.
-
static
id_format
(filename)[source]¶ Identifies the file type as an XML file
- Parameters
- filenamestr
Name of the file to check format for
- Returns
- is_fmtbool
True if it is an XML format, False otherwise
-
static
parse
(*args, **kwargs)[source]¶ Parses XML file and returns deserialized object. The return value depends on the serialized object, summarized below
System : returns simtk.openmm.System
State : returns simtk.openmm.State
Integrator : returns simtk.openmm.Integrator subclass
ForceField : returns simtk.openmm.app.ForceField
- Parameters
- filenamestr or file-like
The file name or file object containing the XML-serialized object
- Returns
- objSystem, State, Integrator, or ForceField
The deserialized object
Notes
OpenMM requires the entire contents of this file read into memory. As a result, this function may require a significant amount of memory.
-
static