- class openfe.ProteinMembraneComponent(rdkit: Mol, box_vectors: Quantity, name: str = '')#
Solvated PDB component with an explicit membrane and periodic box.
Subclass of
SolvatedPDBComponentrepresenting a protein embedded in an explicit membrane (e.g., lipid bilayer). This type serves as a semantic marker enabling membrane-specific simulation behavior. Code elsewhere may use this distinction (e.g., viaisinstancechecks) to enable membrane-specific behavior such as selecting a membrane-aware barostat or simulation protocol.Extends parent validation with a heuristic minimum water-count check.
Notes
All requirements and guarantees of
SolvatedPDBComponentapply.The membrane distinction is conveyed solely through the component type.
Validation includes density and minimum water-count checks.
- 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_waters: int = 50, min_density: ~pint.Quantity = <Quantity(0.7, 'gram / milliliter')>)#
Run heuristic validation checks on the solvated system.
- Parameters:
min_waters (int) – Minimum number of water molecules. Default: 50
min_density (openff.units.Quantity) – Minimum acceptable density. Default: 0.7 g/ml
- Raises:
ComponentValidationError – If one or more validation checks fail. All detected validation errors are aggregated and reported together.
- 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.