Hi thanks for your reply. Yes it is the id. I found out also that it takes a lot time because is looping in all atoms and in the "active" site. So I fixed that. Anyway more in general, I saw that the manual is lacking of some information useful for who wants to program. I mean, sometimes it doesn't say if a command returns a tuple or a list or a dictionary. Ex: cmd.index("selection") is a list?
thanks Regards, andrea 2005/7/6, Gilleain Torrance <gille...@hotmail.com>: > Hi, > > I suppose that these numbers are the atom_ids. It's probably the same > numbers returned by the cmd.index function. > > I guess you could test this by typing "select atom260, id 260" and see if > that makes a selection with atom260... > > As for the speed question, I have no idea. More of a question for Mr DeLano > :) Calculating pairwise like this is always going to be computationally > expensive, but I don't know ways to speed this up. > > gilleain torrance > > > On 5/7/05 15:17, "Andrea Spitaleri" <andrea.spital...@gmail.com> wrote: > > >> HBA = cmd.distance('HBA', '(lig and acc)','(active and don)', 3.2) > > yes thanks for the trick. However, I edited my script to: > > DistOutput.write(" %14s %14s %8s %8s\n"%("donor","acceptor","hba","hbd")) > > DistOutput.write(" %14s %14s %8.3f %8.3f\n"%(Don,Acc,HBA,HBD)) > > but I cannot figure out the meaning of the output: > > complex_1 > > donor acceptor hba hbd > > 260 271 2.536 -1.000 > > complex_2 > > donor acceptor hba hbd > > 391 409 2.489 -1.000 > > complex_3 > > donor acceptor hba hbd > > 522 547 2.512 -1.000 > > complex_4 > > donor acceptor hba hbd > > 653 685 2.456 -1.000 > > what the numbers under donor and acceptor are? > > > >> > >> atoms_Don = cmd.index('don') > >> > > > > I tried also this option and it works fine (more or less) excet that > > it takes a lot time to calculate all the distance (quite weird on my > > dual-cpu 3Gz intel) > > this is the loop used: > > for donor in atoms_Don: > > for acceptor in atoms_Acc: > > di = cmd.get_distance("%s`%d"%donor,"%s`%d"%acceptor) > > DistOutput.write("%8s %8s %8.3f\n"%(donor,acceptor,di)) > > > > thanks > > > > Regards > > > > andrea > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > > _______________________________________________ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users >