thank you very much, Ali!
I only changed the quotes in your script because I have integrated it
to my shell script in order to use with the varibables:

  # run pymol to align the snapshots and save it to the session
  pymol -c -d "
  from pymol import cmd
  cmd.load('${sim}/${simulation}_after_minimization.pdb')
  cmd.load('${sim}/${simulation}_after_equilibration.pdb')
  cmd.remove('resn WAT')
  
cmd.super('${simulation}_after_equilibration*','${simulation}_after_minimization*')
  cmd.bg_color('white')
  cmd.save('${output}/!!!pymol_sessions/${simulation}_superimposed.pse')
  "

вс, 23 июн. 2019 г. в 12:05, Ali Kusay <akus8...@uni.sydney.edu.au>:
>
> Hi James,
>
> Just a follow up, I would still recommend you use the script in a file to do 
> this as it is less messy but it can be done:
>
> pymol -c -d '
> from pymol import cmd
> cmd.load("A.pdb")
> cmd.load("B.pdb")
> cmd.load("C.pdb")
> cmd.super("C*","A*")
> cmd.super("B*","A*")
> cmd.bg_color("white")
> cmd.save("output.pse")
> '
>
> If you paste the above as is in shell It should work provided you are the 
> directory containing the 3 pdb files
>
> Executing pymol with -d flag in shell means you can input pymol commands, to 
> get around indentation you can run leave an ' apostrophe at the end to paste 
> the scripts in and execute all as a string without needing to save as a file
>
> Just for reference, the -c flag is "batch processing (no GUI)" and the 
> commands above can be saved into a python file and ran using:
>
> pymol -c -r  "path_to_script"
>
> Hope this helps.
>
> Cheers,
>
> Ali
> ________________________________________________________________
>
> Ali Kusay | BPharm (Hons) | PhD Candidate & Pharmacist
> The University of Sydney School of Pharmacy | Faculty of Medicine and Health
> 424, Brain and Mind Centre | The University of Sydney | NSW 2050
> Email: akus8...@uni.sydney.edu.au
>
>
> On 23/6/19, 7:00 pm, "James Starlight" <jmsstarli...@gmail.com> wrote:
>
>     hello there,
>
>     As a part of my scripting routine, I would like to use pymol in no-gui
>     mode (directly in the linux shell) to do the following things:
>     1) load in pymol 3 conformations of the same protein, which are
>     defined as A.pdb B.pdb C.pdb
>     2) superimpose C to A using "super" or alternatively (which is better)
>     "alignall" to A
>     3) change background of the session to white :-)
>     4) save the pymol session for the superimposed A B and C as the *.pse
>     output file
>
>     could you suggest me 1 string command for pymol, which I can directly
>     use in shell terminal to do the mentioned routines in no-gui mode?
>
>     thanks you!!
>
>     James
>
>
>     _______________________________________________
>     PyMOL-users mailing list
>     Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>     Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
>
>


_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to