frag_pele/Growing/add_fragment_from_pdbs.py
def check_water(pdb_input):
    """
    Given a pdb file checks if it contains water molecules.
    :param pdb_input: pdb input file
    :return: True or False
    """
    checker = False
    with open(pdb_input) as pdb:
        for line in pdb:
            if "HETATM" in line:
                if line.split()[3] == "HOH":
                    print("Your pdb file contains water molecules")
                    checker = True
                    break
    return checker

    Given a pdb file checks if it contains water molecules.
    :param pdb_input: pdb input file
    :return: True or False
    
Given a pdb file checks if it contains water molecules.
Given a pdb file checks if it contains water molecules .
def check_water(pdb_input):
    checker = False
    with open(pdb_input) as pdb:
        for line in pdb:
            if "HETATM" in line:
                if line.split()[3] == "HOH":
                    print("Your pdb file contains water molecules")
                    checker = True
                    break
    return checker
def check_water ( pdb_input ) : checker = False with open ( pdb_input ) as pdb : for line in pdb : if "HETATM" in line : if line . split ( ) [ 3 ] == "HOH" : print ( "Your pdb file contains water molecules" ) checker = True break return checker
Given a pdb file checks if it contains water molecules.
Given a pdb file checks if it contains water molecules .
"""
    Given a pdb file checks if it contains water molecules.
    :param pdb_input: pdb input file
    :return: True or False
    """
True or False
True or False
pdb_input
pdb input file
pdb input file