ProteinComponent#
- class openfe.setup.system.ProteinComponent(rdkit: Mol, name='')#
Bases:
ExplicitMoleculeComponentComponentrepresenting 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. This is achievable by having the
MonomerInfoattributes present on each atom of the input RDKit molecule, which is done when reading from either PDB or.maefile inputs.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.
- Parameters:
rdkit (rdkit.Mol) – rdkit representation of the protein
name (str, optional) – of the protein, by default “”
Methods
Create
ProteinComponentfrom PDB-formatted file.Create
ProteinComponentfrom PDBX-formatted file.serialize the positions to openmm.unit.Quantity ! only one frame at the moment!
Convert to an openmm Topology object
serialize protein to pdb file.
serialize protein to pdbx file.
- classmethod from_json(json_str)#
- classmethod from_pdb_file(pdb_file: str, 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_json()#
- to_openmm_positions() Quantity#
serialize the positions to openmm.unit.Quantity ! only one frame at the moment!
- 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.