scoring_base – Helper functions for scoring

CleanHydrogens(ent, clib)

Scoring helper - Returns copy of ent without hydrogens

Non-standard hydrogen naming can cause trouble in residue property assignment which is done by the ost.conop.RuleBasedProcessor when loading. In fact, residue property assignment is not done for every residue that has unknown atoms according to the chemical component dictionary. This function therefore re-processes the entity after removing hydrogens.

Parameters:
Returns:

Cleaned and re-processed ent

MMCIFPrep(mmcif_path, biounit=None, extract_nonpoly=False, fault_tolerant=False, extract_seqres_mapping=False)

Scoring helper - Prepares input from mmCIF

Only performs gentle cleanup of hydrogen atoms. Further cleanup is delegated to scoring classes.

Depending on input flags, the following outputs can be retrieved:

  • poly_ent (ost.mol.EntityHandle): An OpenStructure entity with only polymer chains. This is based on _entity.type extracted from mmcif_path. If _entity.type is not defined for every chain, a warning is logged and the returned poly_ent is a selection for peptide and nucleotide residues as defined in the chemical component dictionary.

  • non_poly_entities (list of ost.mol.EntityHandle): OpenStructure entities representing all non-polymer (ligand) entities. This is based on _entity.type extracted from mmcif_path. If _entity.type is not defined for every chain, an error is raised.

  • seqres (ost.seq.SequenceList): Seqres sequences with entity id as sequence names and the respective canonical seqres as sequence. Set to None and triggers a warning if information is missing in mmcif_path.

  • trg_seqres_mapping (dict): Dictionary with chain names in poly_ent as keys and the respective entity ids as values. Set to None and triggers a warning if information is missing in mmcif_path.

Parameters:
  • mmcif_path (str) – Path to mmCIF file that contains polymer and optionally non-polymer entities

  • biounit (str) – If given, construct specified biounit from mmCIF AU

  • extract_nonpoly (bool) – Controls return value

  • fault_tolerant (bool) – Passed as parameter to ost.io.LoadMMCIF()

  • extract_seqres_mapping (bool) – Controls return value

Returns:

poly_ent if extract_nonpoly/extract_seqres_mapping are False. (poly_ent, non_poly_entities) if extract_nonpoly is True. (poly_ent, seqres, trg_seqres_mapping) if extract_seqres_mapping is True. (poly_ent, non_poly_entities, seqres, trg_seqres_mapping) if both flags are True.

PDBPrep(pdb_path, fault_tolerant=False)

Scoring helper - Prepares scoring input from PDB

Only performs gentle cleanup of hydrogen atoms. Further cleanup is delegated to scoring classes. There is no logic to extract ligands from PDB files. Ligands must be provided separately as SDF files in these cases.

Parameters:
  • pdb_path (str) – Path to PDB file that contains polymer entities

  • fault_tolerant (bool) – Passed as parameter to ost.io.LoadPDB()

Returns:

EntityHandle from loaded file.

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

dev / (Currently viewing 2.11) / 2.10 / 2.9.2 / 2.9.1 / 2.9.0 / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.11 / 1.10 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.