frag_pele/Growing/add_fragment_from_pdbs.py
def reduce_molecule_size(molecule, residue, lambda_in):
    """
    This function performs a reduction of the size of a given residue of a ProDy molecule object.
    :param molecule: ProDy molecule object.
    :param residue: Resname of the residue of the molecule that we want to reduce. string
    :param lambda_in: proportion of reduction of the size that we want to apply to the selected residue (between 0 and
    1). float
    :return: modify the coordinates of the selected residue for the result of the reduction.
    """
    if lambda_in >= 0 and lambda_in <= 1:
        selection = molecule.select("resname {}".format(residue))
        centroid = compute_centroid(selection)
        for atom in selection:
            atom_coords = atom.getCoords()
            new_coords = move_atom_along_vector(atom_coords, centroid, lambda_in)
            atom.setCoords(new_coords)
    else:
        logger.critical("Sorry, reduce_molecule_size() needs a lambda value between 0 and 1!")

    This function performs a reduction of the size of a given residue of a ProDy molecule object.
    :param molecule: ProDy molecule object.
    :param residue: Resname of the residue of the molecule that we want to reduce. string
    :param lambda_in: proportion of reduction of the size that we want to apply to the selected residue (between 0 and
    1). float
    :return: modify the coordinates of the selected residue for the result of the reduction.
    
This function performs a reduction of the size of a given residue of a ProDy molecule object.
This function performs a reduction of the size of a given residue of a ProDy molecule object .
def reduce_molecule_size(molecule, residue, lambda_in):
    if lambda_in >= 0 and lambda_in <= 1:
        selection = molecule.select("resname {}".format(residue))
        centroid = compute_centroid(selection)
        for atom in selection:
            atom_coords = atom.getCoords()
            new_coords = move_atom_along_vector(atom_coords, centroid, lambda_in)
            atom.setCoords(new_coords)
    else:
        logger.critical("Sorry, reduce_molecule_size() needs a lambda value between 0 and 1!")
def reduce_molecule_size ( molecule , residue , lambda_in ) : if lambda_in >= 0 and lambda_in <= 1 : selection = molecule . select ( "resname {}" . format ( residue ) ) centroid = compute_centroid ( selection ) for atom in selection : atom_coords = atom . getCoords ( ) new_coords = move_atom_along_vector ( atom_coords , centroid , lambda_in ) atom . setCoords ( new_coords ) else : logger . critical ( "Sorry, reduce_molecule_size() needs a lambda value between 0 and 1!" )
This function performs a reduction of the size of a given residue of a ProDy molecule object.
This function performs a reduction of the size of a given residue of a ProDy molecule object .
"""
    This function performs a reduction of the size of a given residue of a ProDy molecule object.
    :param molecule: ProDy molecule object.
    :param residue: Resname of the residue of the molecule that we want to reduce. string
    :param lambda_in: proportion of reduction of the size that we want to apply to the selected residue (between 0 and
    1). float
    :return: modify the coordinates of the selected residue for the result of the reduction.
    """
modify the coordinates of the selected residue for the result of the reduction.
modify the coordinates of the selected residue for the result of the reduction .
molecule
ProDy molecule object.
ProDy molecule object .
residue
Resname of the residue of the molecule that we want to reduce. string
Resname of the residue of the molecule that we want to reduce . string
lambda_in
proportion of reduction of the size that we want to apply to the selected residue (between 0 and
1). float
proportion of reduction of the size that we want to apply to the selected residue ( between 0 and 1 ) . float