I am attempting to move a group of ligands in a pdb so that they are within a 5 Angstrom distance cutoff from a group of residues in a protein. I know that I can use cons harm and other positional restraints to maintain this distance during a simulation, but I am not sure how to set the initial positions of the ligands. I've tried using coor orie to align the protein to the x-axis and then used coor axis to get the approximate position of the group of residues in the protein (the inferred binding site). I then added 5 to either the x, y or z axis to define a new position for the ligand by using coor set. The first problem I'm encountering is that coor set is used to specify coordinates for a single atom, so my current implementation is assigning the same coordinates to each atom in the ligand.
coor orie sele protein end
coor axis sele resid 101 .or. resid 103 .or. resid 105 end
calc xpos = ?XAXI + 5.0
set ypos = ?YAXI
set zpos = ?ZAXI
coor set xdir @xpos ydir @ypos zdir @zpos sele segid lig1 end
write coor pdb name test.pdb
Maybe I can write a loop for all the atoms in a ligand within a larger loop for all the ligands but I'm wondering if there is a better way to position ligands within a distance cutoff?