Dear Cooters, Thanks to the helpful advice of Paul, Clemens, Eddie, Mark, Marcin, and Xavier I was able to put together a satisfactory solution to the problem at hand. Because I am lazy I put it together in PERL, which is close to useless to anyone with a modern approach to programming. However here's the basic process outlined enough such that someone else should have no issues writing their own in any language they choose :)
Step 1: create a scheme file 'coot.scm' which contains all relevant Coot operations that lead to the creation of the Raster3D file for later rendering. This file can contain all sorts of settings and procedures that make your image pleasing to the eye - for Fo-Fc map+some residues it should also contain the following commands: (set-map-sampling-rate 1.3) (handle-read-draw-molecule "Results/pL305-xzzzzzz _pipedream/postrefine-pL305-xzzzzzz_ligand.restraints/refine.pdb") (make-and-draw-map "Results/pL305-xzzzzzz_pipedream/postrefine-pL305-xzzzzzz_ligand.restraints/refine.mtz" "FOFCWT" "PHFOFCWT" "" 0 1) (set-last-map-contour-level-by-sigma 2.8) (set-go-to-atom-molecule 0) (set-zoom 30) (set-go-to-atom-chain-residue-atom-name "A" 910 " CE1") (set-view-quaternion 0.573595106601715 -0.248451888561249 0.373379826545715 0.685456037521362) (graphics-draw) (raster3d "coot_his910.r3d") An astute reader will note the lowering of sampling rate from default 1.8 because standard compilation of Raster3D has a relatively low polygon limit, and maps tend to have a lot of polygons. Also at this point it is fairly clear that I am processing multiple Pipedream (Global Phasing) datasets :) My lazy way of dealing with multiple datasets is to programmatically replace 'zzzzzz' with the actual dataset name. Step 2: create a script that cycles through all the datasets (we have 700 or so) and runs ... # fix up the script file so the right files are being read open my $in, '<', $file or die "Can't read old file: $!"; open my $out, '>', "$file.new" or die "Can't write new file: $!"; while( <$in> ) { s/zzzzzz/$index3/g; print $out $_; } ... print `coot --no-graphics --no-startup --no-state-script --script $scriptfile`; # this runs coot in background, without graphics ... print `render < coot_his910e.r3d > coot_his910e.png`; # runs Raster3D with default parameters, making a PNG file ... print `mv coot_his910e.png $imgdir`; # moves PNG to where it should be Step 3: Party! (actually in my case I aggregate the PNG files for viewing all together, to see what our fragment screen caught) Hope it helps someone do this next time the need comes up :) Artem - Cosmic Cats approve of this message On Tue, Nov 23, 2021 at 3:03 PM Artem Evdokimov <artem.evdoki...@gmail.com> wrote: > Dear Cooters! > > I am new to this list, but would love to get a little bit of help > scripting Coot to do something for me, like this: > > 1. read one PDB and one MTZ file > 2. center on a particular location (ideally defined as e.g. a residue) > 3. orient in a particular way (defined as a matrix or however convenient) > 4. contour a map (difference or other) at a particular level > 5. output a snapshot > > (all of this without invoking graphical output as such because I need this > to happen a few hundred times, for a few hundred PDB-MTZ pairs. > > Is it doable? Could someone recommend at least a barebones script for this? > > Many thanks :) > > Artem > > - Cosmic Cats approve of this message > ######################################################################## To unsubscribe from the COOT list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1 This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/