[chimerax-users] Obtain electrostatic potential from PQR/DX via script
Elaine Meng
meng at cgl.ucsf.edu
Thu Feb 2 10:30:32 PST 2023
Hi David,
There is a "measure mapvalues" command that will get values of a map (e.g. density or electrostatic potential) at atomic center positions and assign them as an atom attribute. Then the resulting attribute can be written to a file with the "save" command.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#mapvalues>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#attributes>
However, that is different than what you are viewing, the map values at surface vertices (or probably even 1.4 A outward from surface vertices since the default electrostatic coloring uses that offset to approximate the ESP at the solvent-accessible surface even though the solvent-excluded surface is what is actually displayed). These different surface definitions are shown in a diagram here:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html>
These surface values are probably more relevant to understanding molecular interactions than the potential at the atomic centers, which would be singularities if those were the same atoms with charges used to calculate the potential. So an additional step is to make the surface vertices into "fake atoms" (markers) before using measure mapvalues etc. as mentioned at the beginning of this message.
The command to make markers out of a surface is "marker fromMesh":
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/marker.html#create>
So I was able to do this on a small example, first using "coulombic" to calculate an ESP map since I didn't have a dx handy, but your procedure would be analogous, simply opening your dx instead of using "coulombic". In the following example, the molecular surface is #1.1 and the fake atoms made from it are #2:
open 1gcn
coulombic protein map true
surf
marker fromMesh #1.1 edge 0.05
measure mapvalues #1.2 atoms #2 attribute cesp
save ~/Desktop/cesp.defattr attrName cesp models #2
So now I have a plain text file cesp.defattr, format described here
<https://rbvi.ucsf.edu/chimerax/docs/user/formats/defattr.html>
...with contents:
attribute: cesp
recipient: atoms
match mode: 1-to-1
#2/M:1 at M 1.6767187
#2/M:2 at M 1.9566636
#2/M:3 at M -0.15276606
#2/M:4 at M -0.13766149
#2/M:5 at M 3.8019018
#2/M:6 at M 3.8222048
#2/M:7 at M 1.3163166
#2/M:8 at M 1.6913735
#2/M:9 at M -12.664384
#2/M:10 at M -12.545011
#2/M:11 at M 0.17837371
#2/M:12 at M 0.13978194
#2/M:13 at M -13.340148
#2/M:14 at M -13.404252
[.... etc ...]
The main issue I can see is that you don't know where on the surface each fake atom is unless you do something to label or zoom in on it in the 3D display, e.g.
size /M atomRadius 0.1
view /M:1 :<5
label /M:1 color yellow
select /M:1
...to see where on the surface that particular marker (fake atom) resides. Another issue is that the file will be quite large since there are lots of surface vertices.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Feb 1, 2023, at 7:10 PM, Lohry, David via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi everyone,
>
> I'm performing an analysis where I want to select different regions on a molecule and obtain a list of all of the electrostatic potentials from that region. My input is a PQR file with a DX file. These were generated from a PDB and APBS.
>
> The electrostatic potential can be viewed when the option "Report value at mouse position" is selected in the Surface Color tool (Tools...Volume Data...Surface Color...Options button) In the status bar at the bottom, it will show the value along with the coordinates.
>
> Is there a way to obtain this information via a ChimeraX command that I could script?
>
> Thank you!
More information about the ChimeraX-users
mailing list