Project

General

Profile

Feature #2928

Add ability to use expression "count of ATOM_EXPR" in selection statements.

Added by Pat Brian 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
uncategorized
Close

Description

Dynamic selections are awesome. When dealing with molecule sizes and distances that vary, the range of variation can usually be dealt with simply {within 0.5 of group "Protein"}. When dealing with biostructures, the range of size of a feature during a simulation may vary much more. When doing dynamic selections, a selection criteria that encompasses only the target atoms at a large biostructure dimension {within 2.0 of group "Protein"} may select unwanted, non-target atoms when used on a biostructure of a much smaller dimension. When doing dynamic queries of these structures, whose dimensions can vary so widely, the ability to dynamically specify selection dimensions would enable development of true one size(script) fits all(analysis) enables more automated analysis workflow.

My specific need is counting water molecules in the "core" of a lipid bilayer membrane pore that has developed in response to an electric field greater than the pore formation barrier potential. Hopefully, this will fully illustrate my suggestion.

Consider:

I have the cog of a selection that I have named wcog, continuing in my script I add:

xw = x of wcog;
yw = y of wcog;
zw = z of wcog;
radius = ((x-xw)^2+(y-yw)^2)^(1/2)

If i had the ability to add:

limit = (count of wcog) * scaling_factor

I could grab only my target atoms(molecules) that could possibly be part of my biostructure(pore) of interest because of the proper distance limit with:

dyn_mol_cog of resname TIP3 and ((z+1)>zw and (z-1)<zw) and radius < limit

The existing code comes close with the -os option recording the count of items in the ATOM_EXPR for each frame, but that value is not available to quantify what distance dimensions are appropriate for the frame being analyzed.

Hope I've made it sufficiently clear.

Also available in: Atom PDF