INNER CODE UNIT · Python

is_repairable

Electrostatics/pdb2pqr · pdb2pqr/main.py:461

def is_repairable(biomolecule, has_ligand):
    """Determine if the biomolecule can be (or needs to be) repaired.

    :param biomolecule:  biomolecule object
    :type biomolecule:  biomol.Biomolecule
    :param has_ligand:  does the system contain a ligand?
    :type has_ligand:  bool
    :return:  indication of whether biomolecule can be repaired
    :rtype:  bool
    :raises ValueError: if there are insufficient heavy atoms or a significant
        part of the biomolecule is missing
    """
    num_heavy = biomolecule.num_heavy
    num_missing = biomolecule.num_missing_heavy
    if num_heavy == 0:
        if not has_ligand:
            err = (
                "No biomolecule heavy atoms found and no ligand present. "

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…