INNER CODE UNIT · Python

cleanup

Electrostatics/pdb2pqr · pdb2pqr/hydrogens/__init__.py:264

    def cleanup(self):
        """Delete extra carboxylic atoms.

        If there are any extra carboxlyic ``*1`` atoms, delete them.
        This may occur when no optimization is chosen.
        """
        for residue in self.debumper.biomolecule.residues:
            if not isinstance(residue, aa.Amino):
                continue
            if residue.name == "GLH" or "GLH" in residue.patches:
                if residue.has_atom("HE1") and residue.has_atom("HE2"):
                    residue.remove_atom("HE1")
            elif residue.name == "ASH" or "ASH" in residue.patches:
                if residue.has_atom("HD1") and residue.has_atom("HD2"):
                    residue.remove_atom("HD1")

    def is_optimizeable(self, residue):
        """Check to see if the given residue is optimizeable.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…