class openfe.ProteinMembraneComponent(rdkit: Mol, box_vectors: Quantity, name: str = '')#

Solvated PDB component with an explicit membrane and periodic box.

Subclass of SolvatedPDBComponent representing 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., via isinstance checks) 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 SolvatedPDBComponent apply.

  • The membrane distinction is conveyed solely through the component type.

  • Validation includes density, minimum water-count checks and inherited missing residue or capping group checks.

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

  • ValueError – If box_vectors are not valid box vectors.

property n_waters: int#

Number of detected water molecules.

validate(*, min_waters: int = 50, min_density: ~pint.Quantity = <Quantity(0.7, 'gram / milliliter')>, peptide_bond_cutoff: ~pint.Quantity = <Quantity(3.0, 'angstrom')>)#

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

  • peptide_bond_cutoff (openff.units.Quantity. Default: 3.0 * offunit.angstrom) – The cutoff used to detect large peptide bond distances in the protein due to missing residues or capping groups.

Raises:

ComponentValidationError – If one or more validation checks fail. All detected validation errors are aggregated and reported together.

property density: Quantity#

Estimated system density in g/L.

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.