Re: [PyMOL] loop through many pdb files and show their centre of masses

2015-09-15 Thread Tsjerk Wassenaar
Hey Osvaldo, I wasn't sure whether it was COG or COM. For a ligand it may matter. For a macromolecule it won't. That's easy to see by considering the COM as the weighted average of the COGs per atom type. Because the distributions will be pretty much the same in all directions, the COGs will be ap

Re: [PyMOL] loop through many pdb files and show their centre of masses

2015-09-15 Thread Osvaldo Martin
Hi, Tsjerk you are right pseudoatom puts a new atom on the geometric center of a selection. Just a clarification, the center of mass and the geometric center (AKA centroid) are not exactly the same thing. The geometric center is the average of the coordinates and the center of mass is the mass-wei

Re: [PyMOL] loop through many pdb files and show their centre of masses

2015-09-15 Thread Tsjerk Wassenaar
Hi, AFAIK, pseudoatom puts a new atom on the center of mass (or geometry) of the selection. So, import glob from pymol import cmd for pdb in glob.glob("*.pdb"): cmd.pseudoatom(pdb[-3:],"{} and resn LIGANDNAME".format(pdb)) Or along those lines. Be creative :) Cheers, Tsjerk On Tue, Sep 15,

Re: [PyMOL] loop through many pdb files and show their centre of masses

2015-09-14 Thread Osvaldo Martin
Hi Zakir, The following script computes the Center Of Mass (or alternative the geometric center) and then draws a pseudoatom . I think you could adapt the script to your needs if you find difficulties, don’t hesitate to contact the list again (your qu

[PyMOL] loop through many pdb files and show their centre of masses

2015-09-14 Thread Zakir Tnimov
Hi there, I have no experience in scripting what so ever thus this simple task drives me nuts. I was using ZDOCK to dock my protein on the complex. It spits me out 2000 pdb files that each contain a ligand and receptor. Receptor position is fixed, ligand is not. What I want to show is just cent