Hi,
> Just a small doubt
> cmd.load("pdb%04d.pdb"%ener1)
> cmd.load("pdb%04d.pdb"%ener2)
> so if
> ener1 =0001
> ener2 =0002
> The program will understand the pdb0001 and pdb0002 in
> v = cmd.fit("pdb0001 and name CA", "pdb0002 and name CA") or not ?
> or would I need to assign them some names while loading them ?
When you load "fileXYZ.pdb" into PyMOL, the PyMOL object will be
called "fileXYZ"--we just cut off the ".pdb" when making the object
name. So, in your example above
> cmd.load("pdb%04d.pdb"%ener1)
> cmd.load("pdb%04d.pdb"%ener2)
will create two new objects, one called "pdb0001" and "pdb0002" and
the rms command would be:
cmd.rms("pdb0001 and name CA", "pdb0002 and name CA");
If you're scripting this, then you can write the RMS command like this:
cmd.rms( "pdb%04d and name CA" % ener1, "pdb%04d and name CA" % ener2 )
> When and How do I do the import like from pymol import cmd,stored ?
> Where do I place them in my Python script ?
Create a script called "myRMSScript.py" with all the Python/PyMOL
commands in it. At the top of that file put:
import pymol
from pymol import cmd
To run the script just type "run ./path/to/myRMSScript.py" and PyMOL
will run the script.
> Any other function other than FIT like rms_cur,rms, allign that I could use
> to get rmsd between these PDBS
> both my pdbs are of the same protein
Please read the help I suggested earlier. If you type "help fit" you
will see that there are lots of alignment and fitting commands in
PyMOL, including: align, super, pair_fit, rms, rms_cur, intra_fit,
intra_rms, and intra_rms_cur--and each of those commands has
corresponding help documentation and PyMOLWiki page.
Cheers,
-- Jason
> Please advise
> Best
>
> On Wed, Jun 15, 2011 at 2:58 PM, Jason Vertrees
> wrote:
>>
>> Hello,
>>
>> > I am quite new to python and more specifically to PYTHON ,PYMOL
>> > interface
>> > hence I urgently need a help from you.
>>
>> Welcome! This list has about 1500 people on it and is accepting of
>> new users. A couple hints to get you started. First, you can type
>> "help commandName" in PyMOL to help on a given command. You can also
>> type "help" to get general help. Next, we have a community-editable
>> wiki, the PyMOLWiki (http://pymolwiki.org) that has thousands of pages
>> of information to get you up to speed.
>>
>>
>> > I simple need to calculate the RMSD between two pdb files and use that
>> > rmsd
>> > for further programming but somehow I can not figure how to do it
>> > This is what I have written till now
>> > [codes are in bold]
>> >
>> > from pymol import cmd
>> > cmd.load("pdb%04d.pdb"%ener1)
>> > cmd.load("pdb%04d.pdb"%ener2)
>> > This I believe should just load in the PDBs through PYMOL [both these
>> > pdbs
>> > are in the same directory]
>> > rms=cmd.fit(pdb ) so I do not know how to get the RMSD using
>> > this
>> > function ( I need for CA atoms only)
>>
>> Here, cmd.fit is expecting two protein selections to fit. So, we can
>> give it something like:
>>
>> # fit protein pdb0001 to pdb0002
>>
>> v = cmd.fit("pdb0001", "pdb0002")
>>
>> # print the RMS
>>
>> print v
>>
>>
>> But as you stated you only want alpha carbons you can restrict the
>> selection of each protein to just alpha carbons using the selection
>> syntax "name CA":
>>
>> v = cmd.fit("pdb0001 and name CA", "pdb0002 and name CA")
>>
>> print v
>>
>>
>> To learn more about PyMOL selections please see
>> (http://www.pymolwiki.org/index.php/Category:Selecting).
>>
>>
>> > This is the only part where I am getting jammed . I only need the RMSD
>> > values between the structures(without any changes to the structures)
>>
>> If you want PyMOL to do the calculation, but leave the structures
>> untouched use "cmd.rms" instead of "cmd.fit". They both have a
>> similar syntax.
>>
>> Cheers,
>>
>> -- Jason
>>
>> --
>> Jason Vertrees, PhD
>> PyMOL Product Manager
>> Schrodinger, LLC
>>
>> (e) jason.vertr...@schrodinger.com
>> (o) +1 (603) 374-7120
>
>
--
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC
(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
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