[gmx-users] dynamic selection memory allocation problem

Teemu Murtola teemu.murtola at gmail.com
Sun Jun 29 06:58:07 CEST 2014


There were some hardcoded string buffers left from C days that were
necessary for error handling that placed a somewhat arbitrary limitation of
1024 characters per a single selection.

For the matter of what you are trying to achieve, you can probably do that
with gmx distance (with or without the fix for the limitation from Gerrit),
but that tool may not be that well suited for the task. On purpose, I did
not add functionality to do 1-to-many or many-to-many distances there,
since that would better fit into another tool (which I or anyone else has
not had time to write yet), but it seems that this is the functionality you
desire.

I would probably write a custom tool (based on the installed
share/gromacs/template) that would actually calculate the properties you
want, based on a selection that provides the ligand atoms of interest and
the water molecules you want, but I understand that not everyone is fluent
in C/C++.

If your system is big, you can probably also make your selection
substantially more effective by using multiple selections (it does not
appear that you actually need the plus keyword if you are only interested
in the -oall output) and a variable for the part after "or" that is always
evaluated for ~all atoms:

  ligand_p = resname LIG and name P;
  resid 14497 and resname SOL and name LP1 or ligand_p;
  resid 14497 and resname SOL and name LP1 or ligand_p;
  resid 14497 and resname SOL and name LP1 or ligand_p;
  ...

It also sounds that your script probably already has knowledge of the atom
indices, so it could generate the selection to use those directly.


On Fri, Jun 27, 2014 at 6:08 PM, gigo <gigo at ibb.waw.pl> wrote:

> Dear Teemu,
> Thank you! My intention is to calculate many different distances, angles
> an dihedral angles, without prior knowlege of moluecules involved. First, I
> select water molecules that appear around my ligand docked in the protein,
> then analyze positions of these water molecules. I am interested in the
> solvation process, detailed interactions between the solvent and solute.
> Complicating the example that I gave does not change the error, though...
> Best Regards,
>
> g
>
>
> On 2014-06-27 15:48, Teemu Murtola wrote:
>
>> My point about being non-illustrative was that it is impossible for people
>> to suggest alternative solutions if they don't know what you are trying to
>> achieve. If you really want to calculate the same distance multiple times,
>> I'd suggest to calculate it just once, and have a postprocessing script to
>> duplicate it in the output.
>> On Jun 27, 2014 4:28 PM, "gigo" <gigo at ibb.waw.pl> wrote:
>>
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/
> Support/Mailing_Lists/GMX-Users_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list