Hi Marty,
Sorry if this misses your point, but it is possible to translate molecules
independantly in pymol:
http://sourceforge.net/mailarchive/message.php?msg_id=11658301
However, that won¹t help if you want to show overlap. To do this, you would
have to repeatedly call translate and distance over a particular vector:
def translateAndMeasure(selection, other, translationVector, cutoff):
cmd.translate(translationVector, selection)
return checkDistances(selection, other, cutoff)
def checkDistances(moleculeA, moleculeB, cutoff):
ids_A = getIds(moleculeA)
ids_B = getIds(moleculeB)
for idA in ids_A:
for idB in idsB:
d = distance(moleculeA, idA, moleculeB, idB)
if d > cutoff: return "overlap"
return "no overlap"
def distance(a, idA, b, idB):
atomA = "%s and id %s" % (a, idA)
atomB = "%s and id %s" % (b, idB)
return cmd.get_distance(atomA, atomB)
def getIds(selection):
my_dict = { 'my_list' : [] }
cmd.iterate(selection, "my_list.append(ID)", space=my_dict)
return my_dict['my_list']
to use, you would call it like :
print translateAndMeasure("molA", "molB", [1,0,0], 4)
which would print "overlap" if any of the atoms in molA or molB were within
4 Angstrom after translating by 1 along X.
Of course, this could be improved to report exactly /which/ atoms were
overlapping, or to make distance objects (using cmd.distance) to show them.
Also, it is entirely possible that there is a way to do this more easily in
pymol that I missed :)
gilleain torrance
On 12/6/05 20:00, "Marty Taylor" <[email protected]> wrote:
> Hello,
>
> I am looking for a tool to help me build structural models of protein-protein
> interactions. Does anyone know of any software that can both visualize and
> move around large molecules? Even better, ones that will tell me (or show me!)
> when atomic radii start to overlap?
>
> Currently I am holding one molecule still and doing a series of translations
> by hand of the other, then visualizing in PyMOL, then translating again, and
> it is very difficult to make any progress.
>
> thanks in advance!
>
> Marty Taylor
> Department of Chemical Engineering
> Princeton University
> [email protected]