On Oct 17, 2022, at 9:12 AM, Elaine Meng via Chimera-dev <chimera-dev@cgl.ucsf.edu> wrote:


On Oct 17, 2022, at 7:26 AM, Jan Hofmann via Chimera-dev <chimera-dev@cgl.ucsf.edu> wrote:

To whom it may concern,
I want to write a python script to open a pdb file, then load a .xplor file in as well. After one rotation which I also want to do via the script I want to export the output file as a .png file.
Could you provide any advice to me on how to write such a script? I am having troubles loading any python script into ChimeraX. Eventually I want to use this script to batch wise output structures including guest adsorption where the guest species is introduced via the .xplor from previous analysis and the structure is provided by a .pdb file. I really would need some advice/tutorial at this stage so I would be more than happy to hear back from you.
Many thanks and kind regards,
Jan Hofmann, M.Sc.
PhD Student, Department of Chemistry
Chapman Group
Stony Brook University
jan.hofmann@stonybrook.edu
Office: Room 563, Chemistry

Hi Jan,
This is the Chimera list, maybe you wanted to send to chimerax-users@cgl.ucsf.edu instead?  (Cc'd)

Maybe it can be done at least partly with ChimeraX command script instead of a python script.  If you do these steps interactively in ChimeraX, it should show the corresponding commands in the Log .   A ChimeraX command script is just the same commands you would enter in the Command Line, except in a plain text file named something.cxc as explained here:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files>

There is also a "forEachFile" option of the "open" command to read a ChimeraX command file and apply it to a series of input files, e.g. all the .pdb files in some folder.  If you name the .xplor files to match the corresponding .pdb files, maybe you can use the $ mechanism described for that option, see:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


_______________________________________________
Chimera-dev mailing list
Chimera-dev@cgl.ucsf.edu
https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev