[gmx-developers] Making personal plugin
Berk Hess
hessb at mpip-mainz.mpg.de
Thu Mar 13 15:39:16 CET 2008
Jonathan Khao wrote:
> Anton Feenstra a écrit :
>
>> Anton Feenstra wrote:
>>
>>> Mark Abraham wrote:
>>>
>>>> Jonathan Khao wrote:
>>>>
>>>>> Hello !
>>>>>
>>>>> We're currently trying to develop a tool for gromacs which returns
>>>>> the system's coordinates in a cylindrical coordinate. We're
>>>>> newbies in the gromacs developement ... The trxio.h seemed to have
>>>>> the right fuctions to do so. The problem is that it includes a
>>>>> lot of dependencies and making tests and debugging would take an
>>>>> eternity if we'll have to recompile the entire thing. Are
>>>>> there any instructions somewhere on the web on how to make fast
>>>>> tests while programming or any documentation on how to tweak
>>>>> gromacs ? If not , could you give us some hints or instructions ?
>>>>
>>>>
>>>> You haven't explained well enough what you're trying to do... make
>>>> an analysis tool or not? If the former, then your testing cycle
>>>> need only rebuild the executable + objects + libraries that you're
>>>> actually changing, by "make <executable>" in the src/xxx subdirectory.
>>>
>>>
>>> If what you want is extract coordinates in a cylindrical (i.e.,
>>> polar?) representation, I don't see that you need to modify trxio at
>>> all. It should be sufficient to write a small tool that reads
>>> trajectory, calculates cylindrical coordinates, and writes them out.
>>> Presumably, this could be done (re-)using one of the existing
>>> trajectory formats, since the dimensionality doesn't change. (But
>>> you should be careful not to read them as carthesian...) You should
>>> also be careful about precision issues, which are non-homogeneous in
>>> cylindrical/polar.
>>>
>>> What you *might* want to add to the gmxlib are two (simple)
>>> routines, one that converts carthesian coordinates to cylindrical,
>>> and another that does the opposite.
>>
>>
>> Ah, by the way, in case you need it, some of the basic maths can be
>> found in pdbio, where (carthesian) gromacs box (9 matrix elements, or
>> three box edge vectors) is converted to crystal unitcell
>> representation as used in pdb (three angles and three edge lengths).
>>
>>
> Thank you for your responses. Effectively , I haven't been clear on
> what we intend to do. My system is a Protein Detergent Complex, and
> our goal is to know how atoms behave are along the faces of an alpha
> helix. So we wanted to make a tool that read a Trr file, and converted
> the coordinates as a function of :
> - the position along the axis of the protein ( fitted to the Z
> axis )
> - the distance from the axis
> - and an angle
> So correct if I'm wrong, as you suggested, the use of gromacs's
> functions to read the "trr" trajectory is not worth it, a custom made
> tool should therefore be more appropriate ? If so are there any
> instructions on how to "decrypt" the "trr" files ?
g_densmap can make radial/axial density plots.
>
> I've also been working on an other project for some time. I wanted to
> get properties of some molecules (detergents) which are in the
> vicinity of my alpha helix. The properties that I want to get are
> avaliable using the gromacs tools. But where I need help, is in the
> selection of the molecules in the "vicinity".
>
> I've done verry heavy programming scripts which computes the distances
> of each molecules ( degergents ) with the g_mindist , then i read each
> of the "xvg" files , got the intervals where it was under the cutoff
> value, made sub trajectories, concatenated them and then applyed the
> gromacs tools. I suppose there are easy shortcuts to follow ,
> especially by avoiding the time spending printing and reading parts.
> So could you help me by telling me how i could apply a filter on the
> tools ? It would be verry usefull, and would at last help me to dive
> in the gromacs source code.
>
> Thank you again
>
With trjorder you can order molecules in your trajectory on distance to
the helix.
You can then make an index group for the first n molecules to analyze
the closest
n molecules with any Gromacs tool.
Berk.
More information about the gromacs.org_gmx-developers
mailing list