libstructure: functions related to structures
Molecular data structures.
- class haddock.libs.libstructure.Molecule(file_name: Path, segid: int | None = None, no_parent: bool = False)[source]
Bases:
objectInput molecule, usually a PDB file.
- Parameters:
file_name (
pathlib.Path) – The path to the molecule file.segid (int, optional) – The ID of the segment. Defaults to
None.no_parent (boolean) – Whether to add the parent path
..to thehaddock.libs.libstructure.Molecule.with_parent. When set to true, thewith_parentattribute returns the same asfile_name.
- haddock.libs.libstructure.find_ff(models: list[PDBFile]) str[source]
Finds the force-field information (all-atom or martini) from the topology associated to the first model. Used in caprieval and caprifilter.
The assumption is that the force-fields will be identical between models.
- Parameters:
models (list[PDBFile]) – List of models where to find the topology
- Returns:
ff (str) – The force-field used in those models.