- class openfe.ProteinComponent(rdkit: Mol, name='')#
Componentrepresenting the contents of a PDB file, such as a protein.In comparison to a SmallMoleculeComponent, this representation additionally contains information relating to the residue and chain information. Technically, this is done by having the
MonomerInfoattributes present on each atom of the input RDKit molecule, which is done when reading from either PDB or.maefile inputs.- Parameters:
rdkit (rdkit.Mol) – rdkit representation of the protein
name (str, optional) – of the protein, by default “”
Note
This class is a read-only representation of a protein, if you want to edit the molecule do this in an appropriate toolkit before creating an instance from this class.
- classmethod from_pdb_file(pdb_file: PathLike | TextIO, name: str = '')#
Create
ProteinComponentfrom PDB-formatted file.- Parameters:
- Returns:
the deserialized molecule
- Return type:
- classmethod from_pdbx_file(pdbx_file: str, name='')#
Create
ProteinComponentfrom PDBX-formatted file.- Parameters:
- Returns:
the deserialized molecule
- Return type:
- to_openmm_topology() Topology#
Convert to an openmm Topology object
- Returns:
resulting topology obj.
- Return type:
openmm.app.Topology
- 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_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.