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_vectors must be an OpenFF quantity with units.

  • Construction will fail if box vectors cannot be determined.

Parameters:
Raises:
  • TypeError – If box_vectors is not an OpenFF Quantity.

  • ValueError – If box_vectors are not valid box vectors.

property density: Quantity#

Estimated system density in g/L.

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.

classmethod from_rdkit(rdkit: Mol, name: str = '')#

Create a Component, copying from an RDKit Mol

property name: str#
property smiles: str#
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.

Parameters:

out_path (Union[str, bytes, PathLike[str], PathLike[bytes], io.TextIOBase]) – provide path or any string based stream (e.g. FileIO ) to the resulting file

Returns:

string path to the resulting pdb.

Return type:

str

to_pdbx_file(out_path: str | bytes | PathLike[str] | PathLike[bytes] | TextIOBase) str#

serialize protein to pdbx file.

Parameters:

out_path (Union[str, bytes, PathLike[str], PathLike[bytes], io.TextIOBase]) – provide path or FileIO to the resulting file

Returns:

string path to the resulting pdbx.

Return type:

str

to_rdkit() Mol#

Return an RDKit copied representation of this molecule

property total_charge#

Net formal charge for the Component, if defined.