Hi John,

  If you run the measure volume command from a Python script it will return the volume value in cubic Angstroms.

from chimerax.core.commands import run
volume = run(session, 'measure volume #1.2')

  I think the procedure Elaine suggests is not going to give a good indication of the intersection volume.  Instead it is going to tell you the volume of the space between the two molecules where a water molecule will no longer fit when the 2 proteins bind.  The water molecule is modeled as a sphere with default radius 1.4A (the probe radius).  This volume of the water excluded interface region is going to be much larger than small steric clash surface intersections.  In theory if you specified a probe radius of 0 it would work, but the ChimeraX solvent excluded surface is a grid based calculation that uses a default grid spacing of 0.5 Angstroms so you won't be able to reduce the probe radius below 0.5 without the surface becoming a fragmented mess.  You can specify finer grid spacing, but even a spacing of 0.1 Angstrom which may become very slow or run out of memory still is likely to produce a volume number that is almost entirely non-intersecting excluded water space that is much larger than overlap intersections.

  I don't think there is anything in ChimeraX that can give you surface intersection volume.  There is no capability to intersect the solvent excluded surfaces to produce a surface of just the overlapped part.  A very slow calculation might cover the molecular interface with a dense grid of points and calculate how many of the points are inside the atom spheres of both proteins as an estimate of the intersection volume.  I think this calculation might take minutes using a fine grid (e.g. 0.1 Angstrom spacing) and need optimizations to use only the atoms near the interface.

Tom


On Jan 31, 2025, at 12:03 PM, John Watters via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Elaine,

This helped wonderfully!

I was curious if there is any convenient way to store the log output/save the output of "volume measure" as part of a python script? I have to run these calculations on a few hundred files so wanted to look for a way to automate it if possible?

Thank you for any help you can provide and thanks again for all the help you have already provided!

Best,
John

From: Elaine Meng <meng@cgl.ucsf.edu>
Sent: Monday, January 27, 2025 6:16 PM
To: John Watters <jwatters@rockefeller.edu>
Cc: hu.qi--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Question about Surface Volume Overlap Calculation
 
Caution: External email

Hello John,
An approximate approach would be to get molecular surfaces on them separately, measure volume enclosed in each, then make a molecular surface that encloses both and measure its volume, and subtract the former from the latter.
 
See commands: surface (including "enclose" option), measure volume
<https://urldefense.com/v3/__https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html__;!!M59pwtRysTUf!Z3prJ15zNXqEcv9Nsu_9iy43Ex2Z5CjqdV4Tlh7eYr_v1UXgaGpD0rmbCSJqL88cTDPQ1K717MU7uqaW-RHK8CU$ >
<https://urldefense.com/v3/__https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html*options__;Iw!!M59pwtRysTUf!Z3prJ15zNXqEcv9Nsu_9iy43Ex2Z5CjqdV4Tlh7eYr_v1UXgaGpD0rmbCSJqL88cTDPQ1K717MU7uqaWdOClB_s$ >
<https://urldefense.com/v3/__https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html*volume__;Iw!!M59pwtRysTUf!Z3prJ15zNXqEcv9Nsu_9iy43Ex2Z5CjqdV4Tlh7eYr_v1UXgaGpD0rmbCSJqL88cTDPQ1K717MU7uqaWqBOo-2I$ >

Example:

open 4hhb
surf
measure volume #1.2
measure volume #1.3
surface enclose /A,B & protein
measure volume #1.2

... that calculates molecular surfaces separately for 4hhb chains A-D, measures volumes for A and B (reported in Log), creates a new surface that is for the protein chains in A and B combined, measures again (again reported in Log).

It is only approximate because molecular surface is a smoothed solvent-excluded surface (SES), so you're not exactly getting a VDW overlap volume.  What you'd really want is VDW volumes, not SES-enclosed volumes.  But I can't think of a way to get the VDW volume of a set of atoms in ChimeraX.  Theoretically SES with zero radius probe would get it, but this calculation does not work for various reasons.  The smallest probe radius I could use and still get a surface instead of bits was about 0.3 Angstrom.

The ChimeraX "contacts" or "clashes" command reports the exact amount of VDW overlap btween pairs of atoms, but that is a linear (distance) measure.  So another possible measure would be the sum of all pairwise VDW overlaps between the two sets of atoms, but I realize it is not as intuitive as a volume value.
<https://urldefense.com/v3/__https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html__;!!M59pwtRysTUf!Z3prJ15zNXqEcv9Nsu_9iy43Ex2Z5CjqdV4Tlh7eYr_v1UXgaGpD0rmbCSJqL88cTDPQ1K717MU7uqaW6Qzl_RI$ >

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

> On Jan 27, 2025, at 2:46 PM, John Watters via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
> 
> Hello,
> 
> I was wondering if anyone had any tips/tricks/useful functions for quantifying the volume of the overlap between two surfaces in ChimeraX? I am looking specifically to make a metric to compare steric clashes of molecules in different orientations.
> 
> Thank you for any help you can provide!
> 
> Best,
> John

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/