I assume you are referring to 
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/fitting.py 
<http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/fitting.py>

That is a script that creates a function. To turn it into a program, you need 
to set up what you read in and what you output.

In python, this is often done by command line arguments that can read from 
sys.argv 

import sys

arg1 = sys.argv[1]
arg2 = sys.argv[2]

cmd.load(arg1, “protein1”)
cmd.load(arg2, “protein2”)

You can have the definition of fitting in your script, then call

fitting(“protein1”, ????, “protein2”, ????)

I left in questions for the select1 and select2 arguments of the function since 
it is not at all clear what you would like to put in as arguments there.

Beyond that, I would recommend reading up on python assuming you are not 
familiar with the language.

-David


> On Jul 11, 2015, at 10:00 AM, Gazal <gazal...@gmail.com> wrote:
> 
> Thank you for your help, Osvaldo and David.
> 
> I tried using the command but did not get the RMS as expected.. Following are 
> the results:
> 
> 1.
> pymol -cqr fitting.py 1A6M.pdb 4OE9.txt
> PyMOL>run fitting.py,main
> HEADER    OXYGEN TRANSPORT                        26-FEB-98   1A6M
> TITLE     OXY-MYOGLOBIN, ATOMIC RESOLUTION
> COMPND    MOL_ID: 1;
> COMPND   2 MOLECULE: MYOGLOBIN;
> COMPND   3 CHAIN: A
>  ObjectMolecule: Read secondary structure assignments.
>  ObjectMolecule: Read crystal symmetry information.
>  Symmetry: Found 2 symmetry operators.
>  CmdLoad: "1A6M.pdb" loaded as "1A6M".
> HEADER    PROTEIN BINDING                         12-JAN-14   4OE9
> TITLE     THE CRYSTAL STRUCTURE OF THE N-TERMINAL DOMAIN OF COMMD9
> COMPND    MOL_ID: 1;
> COMPND   2 MOLECULE: COMM DOMAIN-CONTAINING PROTEIN 9;
> COMPND   3 CHAIN: A, B;
> COMPND   4 FRAGMENT: COMMD9, UNP RESIDUES  1-117;
> COMPND   5 ENGINEERED: YES;
> COMPND   6 MUTATION: YES
>  ObjectMolecule: Read secondary structure assignments.
>  ObjectMolecule: Read crystal symmetry information.
>  Symmetry: Found 1 symmetry operators.
>  CmdLoad: "4OE9.txt" loaded as "4OE9.txt".
> 
> 2.
> pymol -cqr fitting.py --1A6M.pdb 4OE9.txt
> PyMOL>run fitting.py,main
> 
> Do I need to import Pymol module in the shell script to use the pymol scripts 
> like you did in python? 
> Am I missing something? 
> 
> ​Thanks​
> 
> --
> ​Gazal​
> 
> On Fri, Jul 10, 2015 at 11:36 PM, David Hall <li...@cowsandmilk.net 
> <mailto:li...@cowsandmilk.net>> wrote:
> http://www.pymolwiki.org/index.php/Command_Line_Options 
> <http://www.pymolwiki.org/index.php/Command_Line_Options>
> 
> see the -c and -r options. I also use -q
> 
> pymol -qcr script.py — arg1 arg2 arg3
> 
> 
>> On Jul 10, 2015, at 8:44 AM, Gazal <gazal...@gmail.com 
>> <mailto:gazal...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I'm trying to find the RMSD values for batch purposes. The command which I 
>> found works for the Pymol-command line. 
>> I was hoping if I could get an idea about using the python script fitting.py 
>> in my shell script without triggering the Pymol GUI.
>> 
>> Thanks in advance.
>> 
>> Gazal 
>> ------------------------------------------------------------------------------
>> Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that
>> you need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/_______________________________________________ 
>> <https://www.gigenetcloud.com/_______________________________________________>
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net 
>> <mailto:PyMOL-users@lists.sourceforge.net>)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users 
>> <https://lists.sourceforge.net/lists/listinfo/pymol-users>
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net 
>> <http://www.mail-archive.com/pymol-users@lists.sourceforge.net>
> 
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/_______________________________________________
> 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

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
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

Reply via email to