Re: [PyMOL] Center of mass

2011-03-31 Thread Marius Retegan
Enter editing mode, select the 2 points, press Ctrl + t or type bond on the
cli.

Cheers,
Marius

On Thu, Mar 31, 2011 at 11:36 AM, kanika sharma ksharma...@gmail.comwrote:

 I have two points corresponding to  center of masses of 2 proteins. I have
 to draw a line between both. Is there a feature that can do this?

 --
 Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Center of mass

2011-03-31 Thread kanika sharma
This says that bond can only be added within an object not between 2
objects.
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Center of mass

2011-03-31 Thread Ramiro Téllez Sanz
If I'm not mistaken, you can select both center of masses, since they
are independent objects in the right side bar, and save them together as
a single pdb. Then, when loading this single pdb, you'll be able to draw
the bond.

Hope that helps.

 This says that bond can only be added within an object not between 2
 objects. 


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Center of mass

2011-03-31 Thread Tsjerk Wassenaar
Hi Kanika,

You can also use pseudoatoms. If you have the positions:

pseudoatom coms,pos=[x1,y1,z1]
pseudoatom coms,pos=[x2,y2,z2]
bond coms,coms

Or, if you just have the chains:

pseudoatom coms, chain  a
pseudoatom coms, chain b
bond coms, coms

Alternatively you can use CGO objects. But pseudoatoms are more
versatile in this case.

Hope it helps,

Tsjerk

On Thu, Mar 31, 2011 at 12:12 PM, Ramiro Téllez Sanz
urcind...@gmail.com wrote:
 If I'm not mistaken, you can select both center of masses, since they
 are independent objects in the right side bar, and save them together as
 a single pdb. Then, when loading this single pdb, you'll be able to draw
 the bond.

 Hope that helps.

 This says that bond can only be added within an object not between 2
 objects.


 --
 Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net




-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] radius of gyration

2011-03-31 Thread kanika sharma
After going through the script library and tutorial, I couldn't find
information about calculating the radius of gyration. Is this possible
in pymol? And after this I want to generate a virtual cube around it
of a specific length.


Thanks,

Kanika
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

[PyMOL] RES: radius of gyration

2011-03-31 Thread Julio Cesar da Silva
Dear Kanika,

I do not know how to calculate the Rg using PyMOL. If it is possible, I would 
also like to know how. However, there are other possibilities.
Do you have the pdb file of the molecule from what you want to calculate the 
radius of gyration? If so, you may use the program CRYSOL (download: 
http://www.embl-hamburg.de/biosaxs/crysol.html), which is used for comparison 
with SAXS data. When you run that program, you can search within the log file 
the parameter Envelope Rg. But, keep in mind that the program takes into 
account a solvation layer of about 3 Angstroms.
You can also try the HydroPro program 
(http://leonardo.inf.um.es/macromol/programs/hydropro/hydropro.htm), which I 
believe that makes the Rg calculation, but I rarely use this program for that. 
I am sure that HydroPro can provide you the hydrodynamic radius, but I am not 
sure about the Rg.

Regards,
Julio

De: kanika sharma [mailto:ksharma...@gmail.com]
Enviada em: quinta-feira, 31 de março de 2011 14:46
Para: pymol-users
Assunto: [PyMOL] radius of gyration


After going through the script library and tutorial, I couldn't find 
information about calculating the radius of gyration. Is this possible in 
pymol? And after this I want to generate a virtual cube around it of a specific 
length.



Thanks,

Kanika
--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] RES: radius of gyration

2011-03-31 Thread Tsjerk Wassenaar
Hi :)

The radius of gyration is not that tough. Here's a python script to do
it in pymol. Do note that the hydrodynamic radius is something
related, but different.

from pymol import cmd
import math

def rgyrate(selection):
  # Get the atoms for the selection
  model=cmd.get_model(selection).atom
  # Extract the coordinates
  x=[i.coord for i in model]
  # Get the masses
  mass=[i.get_mass() for i in model]
  # Mass-weighted coordinates
  xm=[(m*i,m*j,m*k) for (i,j,k),m in zip(x,mass)]
  # Sum of masses
  tmass=sum(mass)
  # First part of the sum under the sqrt
  rr=sum(mi*i+mj*j+mk*k for (i,j,k),(mi,mj,mk) in zip(x,xm))
  # Second part of the sum under the sqrt
  mm=sum((sum(i)/tmass)**2 for i in zip(*xm))
  # Radius of gyration
  rg=math.sqrt(rr/tmass-mm)
  # Print it...
  print Radius of gyration:, rg
  return rg

cmd.extend(rgyrate,rgyrate)

Hope it helps,

Tsjerk

On Thu, Mar 31, 2011 at 3:03 PM, Julio Cesar da Silva
julio.si...@lnbio.org.br wrote:
 Dear Kanika,



 I do not know how to calculate the Rg using PyMOL. If it is possible, I
 would also like to know how. However, there are other possibilities.

 Do you have the pdb file of the molecule from what you want to calculate the
 radius of gyration? If so, you may use the program CRYSOL (download:
 http://www.embl-hamburg.de/biosaxs/crysol.html), which is used for
 comparison with SAXS data. When you run that program, you can search within
 the log file the parameter “Envelope Rg”. But, keep in mind that the program
 takes into account a solvation layer of about 3 Angstroms.

 You can also try the HydroPro program
 (http://leonardo.inf.um.es/macromol/programs/hydropro/hydropro.htm), which I
 believe that makes the Rg calculation, but I rarely use this program for
 that. I am sure that HydroPro can provide you the hydrodynamic radius, but I
 am not sure about the Rg.



 Regards,

 Julio



 De: kanika sharma [mailto:ksharma...@gmail.com]
 Enviada em: quinta-feira, 31 de março de 2011 14:46
 Para: pymol-users
 Assunto: [PyMOL] radius of gyration



 After going through the script library and tutorial, I couldn't find
 information about calculating the radius of gyration. Is this possible in
 pymol? And after this I want to generate a virtual cube around it of a
 specific length.



 Thanks,

 Kanika

 --
 Create and publish websites with WebMatrix
 Use the most popular FREE web apps or write code yourself;
 WebMatrix provides all the features you need to develop and
 publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net




-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Center of mass

2011-03-31 Thread 耿存亮
Hi Kanika and Tsjerk,

if you use the commands below:

pseudoatom coms, chain  a
pseudoatom coms, chain b
bond coms, coms

you create the center of geometry rather than the center of mass.
I'd like to know how to create the center of mass.

Alternatively you can use the command distance to draw a line between 2 points 
or selections,
distance name,pointA,pointB


Hope it helps,

Cunliang--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] RES: radius of gyration

2011-03-31 Thread Thomas Holder
Hi Tsjerk,

very nice script! I have added it to the PyMOLWiki at 
http://pymolwiki.org/index.php/Radius_of_gyration

Cheers,
   Thomas

Tsjerk Wassenaar wrote, On 03/31/11 16:07:
 Hi :)
 
 The radius of gyration is not that tough. Here's a python script to do
 it in pymol. Do note that the hydrodynamic radius is something
 related, but different.
 
 from pymol import cmd
 import math
 
 def rgyrate(selection):
   # Get the atoms for the selection
   model=cmd.get_model(selection).atom
   # Extract the coordinates
   x=[i.coord for i in model]
   # Get the masses
   mass=[i.get_mass() for i in model]
   # Mass-weighted coordinates
   xm=[(m*i,m*j,m*k) for (i,j,k),m in zip(x,mass)]
   # Sum of masses
   tmass=sum(mass)
   # First part of the sum under the sqrt
   rr=sum(mi*i+mj*j+mk*k for (i,j,k),(mi,mj,mk) in zip(x,xm))
   # Second part of the sum under the sqrt
   mm=sum((sum(i)/tmass)**2 for i in zip(*xm))
   # Radius of gyration
   rg=math.sqrt(rr/tmass-mm)
   # Print it...
   print Radius of gyration:, rg
   return rg
 
 cmd.extend(rgyrate,rgyrate)
 
 Hope it helps,
 
 Tsjerk

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net