Repository navigation
Cavitracer multimodel - #2282
Conversation
…meraX scripts take their colours from pregenerated high contrast palette, so a channel is the same colour in all three. VMD keeps ranks 0-29 in fixed colour IDs and later ranks in colour-scale IDs.
…esFromChannels automatically. A run writes its results only; the viewer scripts come from the dedicated write*CaviTracerScript functions supplying viewers for PyMOL, VMD, or ChimeraX
…phere. The PDB reader ChimeraX opens a PQR with keeps the radius as the B-factor, and size byattribute copies it across, where one size command per sphere took over a minute for thousands of spheres; combineSymAtoms false stops it merging spheres that lie close together.
…format='pqr' writes every object into one file, as the VMD and ChimeraX writers do, and vis_channels.py now splits such a file into one object per channel, named, coloured and grouped as from an mmCIF. The default stays mmCIF.
…ame run into one multi-model PQR, a MODEL block per frame numbered by the frame, with an optional stride.
…ltiModelScript writes one for a multimodel PQR on disk. The script decides what to show based on the file, so one structure opens as before and a multimodel PQR opens as a submodel per frame,browsable with a slider.
…iModelScript writes it for a PQR on disk. Each channel rank becomes one object with a state per frame, titled with the frame number; a PQR of one structure opens as before.
…ript writes one for a PQR on disk. The script reads the PQR itself, a molecule per MODEL, and VMD's animation slider shows one frame at a time; only the slider's molecule follows the animation, as a frame change made VMD rebuild the protein's surface every step. One structure opens as before.
…a coordinate set per model, rather than a submodel per model drawn on top of one another.
…r channels came from. calcChannelsMultipleFrames records the frame in each frame's details, and calcPoresFromChannelsMultipleFrames names the pore files by it, so a run started past frame 0 no longer numbers its pores from 0.
… all three can be called alike as (pqr_file, atoms, output_path).
…ame that found nothing gets a MODEL holding a radius-0 NIL placeholder, so frames stay in step in every viewer; frames= names the run's frames, so empty first and last frames are written too; links=True merges the links files. The stride option is removed.
|
@karolamik13 ready for your review. |
There was a problem hiding this comment.
I tested the code, and I would add one improvement for writePyMolMultiModelScript.
For VMD and ChimeraX, we need to specify the object type if we want to save something other than channels, but for writePyMolMultiModelScript, once we add the parameter 'object_type,' the code is crashing. To be consistent, I would add this parameter to match two other functions. It can be skipped inside the function. In VMD and ChimeraX, I wanted to use something other than VMD representation for surface cavities because they do not look nice. This is one reason we need to specify the object type in the function.
Also, the question is whether we like the visualization of surface cavities in PyMol. See below all three visualizations for channels and surface cavities (sorry for the different angles applied to the protein structure). Those are examples from the tutorial, so later I will add them there.
|
@karolamik13 I am on it. So, for surface cavities in pymol, we would like to have some surface too, right? |
If we want to have a similar visualization for all, then yes. |
…ake the same object types as the VMD and ChimeraX ones. writePyMolCaviTracerScript writes cavities and connected results as PQR, writePyMolMultiModelScript accepts object_type, and the viewer tells a connected file's cavities from its channels by chain. The three writers now share one PQR writer.
|
@karolamik13 should be working now, tested on a couple of structures |
…ushed deeper even onto narrower tetra by start point optimization, which could even seal the cavity. Now the start point tetra is alway considered when selecting best available tetra within search distance.
|
@karolamik13 the failed check seems to be unrelated to the work done here; not sure how that occurred. |
karolamik13
left a comment
There was a problem hiding this comment.
Now, it looks good. I tested the code on two systems, both channels and surface cavities.
Adds multi-model output to CaviTracer and lets the VMD, PyMOL and ChimeraX viewer scripts show it frame by frame.
New
mergeFramesPQRmerges the per-frame PQR files of a multi-frame run into one multi-model PQR, one MODEL per frame. Frames that found nothing are kept as placeholders, so frames stay in step in every viewer. Chamber links can be merged too (links=True).writeVmdMultiModelScript,writePyMolMultiModelScriptandwriteChimeraXMultiModelScriptwrite a viewer script for a PQR on disk. The frames are stepped through with each program's own slider or state controls.Changed
writePyMolCaviTracerScriptcan write a PQR (output_format='pqr'); mmCIF stays the default.calcChannelsandcalcPoresFromChannelsno longer write a PyMOL script automatically; thewrite*CaviTracerScriptfunctions do that.Example