frag_pele/Growing/add_fragment_from_pdbs.py
def check_and_fix_repeated_lignames(pdb1, pdb2, ligand_chain_1="L", ligand_chain_2="L", resnum_1=None, resnum_2=None):
    """
    It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name "GRW" and it is replaced
    by "LIG".
    :param pdb1: pdb file 1
    :param pdb2: pdb file 2
    :return:
    """
    name_1 = extract_atoms_pdbs(pdb1, create_file=False, chain=ligand_chain_1, resnum=resnum_1)
    name_2 = extract_atoms_pdbs(pdb2, create_file=False, chain=ligand_chain_2, resnum=resnum_2)
    if name_1 == name_2 or name_1 == "GRW":
        logging.warning("REPEATED NAMES IN LIGANDS FOR THE FILES: '{}' and '{}'. {} replaced by LIG ".format(pdb1, pdb2, name_1))
        lignames_replacer(pdb1, name_1, "LIG")

    It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name "GRW" and it is replaced
    by "LIG".
    :param pdb1: pdb file 1
    :param pdb2: pdb file 2
    :return:
    
It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name "GRW" and it is replaced
by "LIG".
It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name " GRW " and it is replaced by " LIG " .
def check_and_fix_repeated_lignames(pdb1, pdb2, ligand_chain_1="L", ligand_chain_2="L", resnum_1=None, resnum_2=None):
    name_1 = extract_atoms_pdbs(pdb1, create_file=False, chain=ligand_chain_1, resnum=resnum_1)
    name_2 = extract_atoms_pdbs(pdb2, create_file=False, chain=ligand_chain_2, resnum=resnum_2)
    if name_1 == name_2 or name_1 == "GRW":
        logging.warning("REPEATED NAMES IN LIGANDS FOR THE FILES: '{}' and '{}'. {} replaced by LIG ".format(pdb1, pdb2, name_1))
        lignames_replacer(pdb1, name_1, "LIG")
def check_and_fix_repeated_lignames ( pdb1 , pdb2 , ligand_chain_1 = "L" , ligand_chain_2 = "L" , resnum_1 = None , resnum_2 = None ) : name_1 = extract_atoms_pdbs ( pdb1 , create_file = False , chain = ligand_chain_1 , resnum = resnum_1 ) name_2 = extract_atoms_pdbs ( pdb2 , create_file = False , chain = ligand_chain_2 , resnum = resnum_2 ) if name_1 == name_2 or name_1 == "GRW" : logging . warning ( "REPEATED NAMES IN LIGANDS FOR THE FILES: '{}' and '{}'. {} replaced by LIG " . format ( pdb1 , pdb2 , name_1 ) ) lignames_replacer ( pdb1 , name_1 , "LIG" )
It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name "GRW" and it is replaced
by "LIG".
It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name " GRW " and it is replaced by " LIG " .
"""
    It checks if two pdbs have the same ligand name or if the pdb file 1 has as ligand name "GRW" and it is replaced
    by "LIG".
    :param pdb1: pdb file 1
    :param pdb2: pdb file 2
    :return:
    """
None
pdb1
pdb file 1
pdb file 1
pdb2
pdb file 2
pdb file 2
ligand_chain_1
ligand_chain_2
resnum_1
resnum_2