update:

for the realisation I have tried to use sep_state script with python version

so I modified sep_state adding superimposition
# pymol_save.py#
from pymol import cmd
import glob
import re

def save_sep(prefix=''):
  obj_list = cmd.get_names("public_objects")
  if obj_list:
    for i in range(len(obj_list)):
      obj_name = "%s%s.pdb" % (prefix, obj_list[i])
      cmd.save(obj_name, obj_list[i])
      print "Saving %s" %  obj_name
  else:
    print "No objects found"

cmd.extra_fit('name CA', '*', 'super')
cmd.extend('save_sep', save_sep)


and use it with my pdbs
pymol ${output}/*.pdb -ckqr pymol_save.py > ${output}/!temp/rmsf_fit.log

it align ensemble but did not save the resulted pdbs in separate
files. Finally, the same happenes when I open it in Pymol GUI
pymol-2.2.0 *.pdb pymol_save.py
remarkably when I use in this GUI session just a command 'save_sep' it
saves the files within the same directory (Which is ok!)
however cmd.extend('prefix', save_sep)does not work :(

чт, 27 июн. 2019 г. в 11:48, James Starlight <jmsstarli...@gmail.com>:
>
> Dear Pymol users!
>
> I have a folder with many pdb files. I would like to use pymol in
> no-gui mode in order to i)load all pdb within the pymol; ii)
> superimpose each pdb agains the first (top) pdb; iii) save sperimposed
> pdbs into the new folder under the SAME names of pdbs.
>
> Here is model of my script, which should be modified according to the
> indicated commentaries (mostly on the step of saving results).
>
> ${pymol} -c -d "
>   from pymol import cmd
>   # we open at once all pdbs which have "B-factors" suffix in its name!
>   cmd.load('${output}/!temp/B-factors*')
>   # it do almost what I want in terms of the superimposition, however
> not all snapshots are aligned properly
>   cmd.extra_fit('name CA', '*', 'super')
>  # here the most tricky part that should be modified since I need to
> save snapshots using some command keeping its original names!
>   cmd.save('output' + '.pdb')
>   "
>
> so the task is that I would like to use it in one command rather then
> to put inside the loop (e.g. opening 2 snapshots for each time to make
> mobile, reference superimposition, which is more easy way).
>
> Thank you in advance!
> 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

Reply via email to