api¶
Public functions of the ParmEd-based force-field import.
Summary¶
Functions:
Imports ParmEd, which is an optional dependency. |
|
Loads a parametrized structure with ParmEd. |
|
Converts an AMBER, CHARMM or GROMACS force field into PQ setup files. |
Reference¶
- import_parmed() Any[source]¶
Imports ParmEd, which is an optional dependency.
- Returns:
The parmed module.
- Return type:
module
- Raises:
ImportError – If ParmEd is not installed.
- load_structure(
- topology_file: str | Path,
- coordinate_file: str | Path | None = None,
- parameter_files: Sequence[str | Path] = (),
Loads a parametrized structure with ParmEd.
- Parameters:
topology_file (str | Path) – AMBER prmtop, GROMACS top or CHARMM psf file.
coordinate_file (str | Path | None, optional) – Coordinates (inpcrd/rst7, gro, crd, pdb, …), by default None.
parameter_files (Sequence[str | Path], optional) – CHARMM parameter and stream files (prm, rtf, str), needed for a psf topology, by default ().
- Returns:
The structure with parameters and, if given, coordinates.
- Return type:
parmed.Structure
- Raises:
Parm2PQError – If a psf topology is given without parameter files.
- parm2pq(
- topology_file: str | Path,
- coordinate_file: str | Path | None = None,
- parameter_files: Sequence[str | Path] = (),
- output_dir: str | Path = '.',
- shake_h: bool = False,
- rcoulomb: Real = 12.0,
- overwrite: bool = False,
- long_range: str | None = None,
Converts an AMBER, CHARMM or GROMACS force field into PQ setup files.
The function writes
moldescriptor.dat,topology.top,parameter.prm,intra_nonbonded.dat,start.rstand the input snippetpq_input.inintooutput_dir, andmshake.datifshake_hkeeps rigid water rigid with M-SHAKE.- Parameters:
topology_file (str | Path) – AMBER prmtop, GROMACS top or CHARMM psf file.
coordinate_file (str | Path | None, optional) – The coordinates; required unless the topology contains them.
parameter_files (Sequence[str | Path], optional) – CHARMM parameter and stream files for a psf topology.
output_dir (str | Path, optional) – The output directory, by default the working directory.
shake_h (bool, optional) – Constrain bonds to hydrogen with SHAKE, by default False. Rigid three-site water (with an H-H bond) gets M-SHAKE instead.
rcoulomb (float, optional) – The Coulomb cutoff in Angstrom for the input snippet and the vacuum box of a structure without box, by default 12.0.
overwrite (bool, optional) – Replace existing output files, by default False.
long_range (str | None, optional) – The long-range Coulomb method for the input snippet (
none,wolforreaction-field), by defaultwolffor a box from the input andnonefor a vacuum box.
- Returns:
The converted setup.
- Return type:
- Raises:
UnsupportedForceFieldTermError – If the force field contains a term PQ cannot evaluate.
Parm2PQError – If the input cannot be converted or long_range is unknown.
FileExistsError – If an output file exists and overwrite is False.