[Chimera-users] Coulombic (Mailing list question)
goddard at sonic.net
Tue Nov 21 11:10:24 PST 2017
Unfortunate. I guess what happens is that even if you close the surface and recompute it then color it, the notice that the atomic coordinates changed is still pending and when that notification is handled before drawing the next graphics frame the code recomputes the surface even thought it was already recomputed, eliminating the coloring.
One way to handle this in the code is to remember the previous atomic coordinates and radii used for the last surface calculation and if they haven’t changed, don’t recalculate the surface. I know I coded a version of that at some point but I don’t see it in the code.
> On Nov 21, 2017, at 9:55 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> At least for my test system, that did not work, nor did adding “wait” in various places… the coloring still got wiped out.
>> On Nov 21, 2017, at 9:37 AM, Tom Goddard <goddard at sonic.net> wrote:
>> If you wanted to try molecular surfaces I think the perframe script would include the surface command
>> coulombic ...
>> As Elaine points out if you leave out the surface command the surface does automatically update but only after the coloring which erases the coloring. I'm not sure if the surface command above will do the trick, maybe it will think the surface is already there and do nothing so you may need to delete the surface and recreate it in the perframe script.
>>> On Nov 21, 2017, at 9:28 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>>> Hello Ryder,
>>> Your Answer of the Day:
>>> The error is probably “No molecular surfaces selected with atom spec” and you would get that error when you haven’t shown a surface, since the Coulombic coloring applies only to surfaces.
>>> (Also, for “classical” coloring by electrostatic potential, you probably want white between the red and the blue.)
>>> So, the short answer may be to show a surface first (e.g. command “surface”). However, this does not work well with trajectories, for two reasons. The molecular surface automatically recalculates when coordinates change, and when I put “coulombic” into a per-frame script it is poorly synchronized so that the surface update wipes out the Coulombic coloring so that it’s never visible, at least in my test system. Secondarily, molecular surface calculation is prone to failures and usually at least a few of the trajectory frames have a surface-calculation error or crazy-looking surface. However, you could try it on your system, e.g. show surface and then apply a per-frame script with something like the following command (if your molecular surface is #0, can check in the Model Panel):
>>> coulombic -10 red 0 white 10 blue #0
>>> Assuming you have the same prohibitive problems I observed, here is one possible workaround but it is more effort in deciding waht parameters to use. At each frame calculate a molmap surface (isosurface of density simulated from atomic positions), adjust isosurface level so it is somewhat similar to the molecular surface shape, apply coulombic coloring. E.g. per-frame script something like the following, but with variations depending on your system:
>>> I decided on the “level” value of 0.2 by showing a molecular surface along with the molmap surface, changing the molmap surface to mesh representation (in the Volume Viewer dialog that automatically appears when you use molmap) and dragging the bar on the Volume Viewer histogram so that the mesh surface was in a similar location to the molecular surface. The value is shown in the “Level” field in the Volume Viewer dialog. This only needs to be done once, i.e. the isosurface level that's reasonable for one frame should be equally reasonable for the other frames. The two kinds of surfaces will never be exactly the same since they are calculated differently, but you can shoot for similar enough. Then you would close (delete) the molecular surface and change the molmap surface back to “surface” style in Volume Viewer before proceeding with your trajectory playback with the per-frame script.
>>> See the help pages of the commands for details on the options, but in a nutshell the molmap command simulates a density map from the protein atoms (you could specify the atoms differently, I just mean my example uses “protein”) and makes that map a new model #2. The volume command sets the isosurface level of model #2 to 0.2. The coulombic command colors the molmap surface #2 by the potential calculated from the protein atoms.
>>> I hope this helps,
>>> Elaine C. Meng, Ph.D.
>>> UCSF Chimera(X) team
>>> Department of Pharmaceutical Chemistry
>>> University of California, San Francisco
>>>> On Nov 21, 2017, at 7:41 AM, RYDER WHITTAKER HAWKINS <Ryder.Whittaker at crchudequebec.ulaval.ca> wrote:
>>>> My Question of the Day:
>>>> - I am running an MD movie in Chimera
>>>> - I want to display the solvent excluded surface colored by coulombic potential.
>>>> - I would like to implement this command as a script at each frame.
>>>> What is the command? I am getting error after error...
>>>>> coulombic -10 red 10 blue
>>>> How could I put this in a Per-Frame analysis?
>>>> Thanks for any suggestions. The documentation is not so clear for this coulombic function.
>>>> Ryder Whittaker Hawkins
>>>> MSc Candidate
>>>> PI: Dr. Luc Vallières
>>>> ryder.whittaker at crchudequebec.ulaval.ca
>>>> Work: (418) 525-4444
>>>> Cell: (613) 979-7729
>>>> Dept. of Molecular Medicine
>>>> Université Laval (CHUL)
>>>> 2705 Laurier Blvd
>>>> Québec, QC
>>>> G1V 4G2
>>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
>>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users