- class openfe.SolvatedPDBComponent(rdkit: Mol, box_vectors: Quantity, name: str = '')#
PDB component with explicit solvent and box vectors.
This class represents an explicit component structure that is associated with explicit box vectors. Unlike
ProteinComponent, instances of this class always have box vectors, which are treated as part of the component’s identity (affecting equality and hashing).Notes
box_vectorsmust be an OpenFF quantity with units.Construction will fail if box vectors cannot be determined.
- Parameters:
rdkit (rdkit.Chem.Mol) – RDKit representation of the solvated Component.
box_vectors (openff.units.Quantity) – Periodic box vectors with units of length, compatible with nanometers. Must be a (3, 3) array in reduced form. Reduced form is a canonical representation of the unit cell and removes ambiguity in periodic boundary conditions (see https://docs.openmm.org/latest/userguide/theory/05_other_features.html).
name (str, optional) – Name of the component.
- Raises:
TypeError – If
box_vectorsis not an OpenFF Quantity.ValueError – If
box_vectorsare not valid box vectors.
- validate(*, min_density: ~pint.Quantity = <Quantity(0.7, 'gram / milliliter')>)#
Run heuristic validation checks on the solvated system.
- Parameters:
min_density (openff.units.Quantity) – Minimum acceptable density. Default: 0.7 g/ml
- Raises:
ComponentValidationError – If the density is lower than the minimum density.
- classmethod from_pdb_file(pdb_file: ~os.PathLike | ~typing.TextIO, name: str = '', *, box_vectors=None, infer_box_vectors: bool = False, box_padding: ~pint.Quantity = <Quantity(0.2, 'nanometer')>)#
Create a SolvatedPDBComponent from a PDB file.
- classmethod from_pdbx_file(pdbx_file: str, name: str = '', *, box_vectors=None, infer_box_vectors: bool = False, box_padding: ~pint.Quantity = <Quantity(0.2, 'nanometer')>)#
Create a SolvatedPDBComponent from a PDBx/mmCIF file.
- to_openmm_positions() Quantity#
serialize the positions to openmm.unit.Quantity
Note
Currently only one frame/model is given
- Returns:
Quantity containing protein atom positions
- Return type:
omm_unit.Quantity
- to_openmm_topology() Topology#
Convert to an openmm Topology object
- Returns:
resulting topology obj.
- Return type:
openmm.app.Topology
- to_pdb_file(out_path: str | bytes | PathLike[str] | PathLike[bytes] | TextIOBase) str#
serialize protein to pdb file.
- to_pdbx_file(out_path: str | bytes | PathLike[str] | PathLike[bytes] | TextIOBase) str#
serialize protein to pdbx file.
- property total_charge#
Net formal charge for the
Component, if defined.