frag_pele/Growing/add_fragment_from_pdbs.py
def translate_to_position(initial_pos, final_pos, molecule):
    """
    This function applies a translation of a whole molecule, using the vector from the initial_pos to the final_pos.
    :param initial_pos: initial position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param final_pos: final position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param molecule: ProDy molecule object.
    :return: modify the coordinates of the molecule.
    """
    translation = initial_pos - final_pos
    coords_to_move = molecule.getCoords()
    list_of_new_coords = []
    for coords in coords_to_move:
        new_coords = coords + translation
        list_of_new_coords.append(new_coords[0])
    molecule.setCoords(list_of_new_coords)

    This function applies a translation of a whole molecule, using the vector from the initial_pos to the final_pos.
    :param initial_pos: initial position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param final_pos: final position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param molecule: ProDy molecule object.
    :return: modify the coordinates of the molecule.
    
This function applies a translation of a whole molecule, using the vector from the initial_pos to the final_pos.
This function applies a translation of a whole molecule using the vector from the initial_pos to the final_pos .
def translate_to_position(initial_pos, final_pos, molecule):
    translation = initial_pos - final_pos
    coords_to_move = molecule.getCoords()
    list_of_new_coords = []
    for coords in coords_to_move:
        new_coords = coords + translation
        list_of_new_coords.append(new_coords[0])
    molecule.setCoords(list_of_new_coords)
def translate_to_position ( initial_pos , final_pos , molecule ) : translation = initial_pos - final_pos coords_to_move = molecule . getCoords ( ) list_of_new_coords = [ ] for coords in coords_to_move : new_coords = coords + translation list_of_new_coords . append ( new_coords [ 0 ] ) molecule . setCoords ( list_of_new_coords )
This function applies a translation of a whole molecule, using the vector from the initial_pos to the final_pos.
This function applies a translation of a whole molecule using the vector from the initial_pos to the final_pos .
"""
    This function applies a translation of a whole molecule, using the vector from the initial_pos to the final_pos.
    :param initial_pos: initial position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param final_pos: final position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
    :param molecule: ProDy molecule object.
    :return: modify the coordinates of the molecule.
    """
modify the coordinates of the molecule.
modify the coordinates of the molecule .
initial_pos
initial position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
initial position in 3D coordinates . Generally we use the coordinates of an atom . numpy . ndarray
final_pos
final position in 3D coordinates. Generally we use the coordinates of an atom. numpy. ndarray
final position in 3D coordinates . Generally we use the coordinates of an atom . numpy . ndarray
molecule
ProDy molecule object.
ProDy molecule object .