INNER CODE UNIT · Python

drop_water

Electrostatics/pdb2pqr · pdb2pqr/main.py:507

def drop_water(pdblist):
    """Drop waters from a list of PDB records.

    .. todo:: this module is already too long but this function fits better
        here. Other possible place would be utilities.

    :param pdb_list:  list of PDB records as returned by io.get_molecule
    :type pdb_list:  [str]
    :return:  new list of PDB records with waters removed.
    :rtype:  [str]
    """
    pdblist_new = []
    for record in pdblist:
        record_type = record.record_type()
        if (
            record_type in ["HETATM", "ATOM", "SIGATM", "SEQADV"]
            and record.res_name in aa.WAT.water_residue_names
        ):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…