[gmx-developers] Reading unprocessed topology files

Mark Abraham mark.j.abraham at gmail.com
Mon May 27 15:56:53 CEST 2013


On Mon, May 27, 2013 at 3:40 AM, Pedro Lacerda <kanvuanza+gmx at zoho.com>wrote:

> **
> Hello all,
>
> I met gromacs and molecular dynamics an year ago for my undergrad project.
> I know next to nothing about biochemistry or physics but I'm able to
> program in Python and trying to learn C/C++ with gromacs. Because I'm from
> Bahia-Brazil my native language is portuguese, and I did really bad on
> english courses, sometimes I can misunderstand you or explain myself in a
> confusing manner.
>
> Recently I fixed two bugs in genion (really wasn't me but the reviewers :) Fix
> -neutral option in genion<https://gerrit.gromacs.org/#q,I08b019b05cf3d8511757c4665c24dcaa37968ceb,n,z>
>  and Fix genion -nq and -pq when using -neutral<https://gerrit.gromacs.org/#q,If2a82ace079555d8a684ea876daa947677d5e442,n,z>,
> saw bug #615 <http://redmine.gromacs.org/issues/615>, and felt me
> adventurous.
>
>
Thanks again for the initiative. Those kinds of issues are everywhere in
GROMACS, but some impetus to pick the ones to fix is welcome!


> ## The question:
> How can I read an topology file for populate my t_atoms (or gmx_mtop_t)
> with eg. charges and masses? read_tpx() in tpxio.h can use only
> preprocessed file formats like TPR. do_top() in topio.h seems a bit
> exagerated (in number of function parameters) to just parse an TOP or ITP
> file and populate some objects. If do_top() is the way to go, is
> grompp's new_status() approach reasonable?
>

The lack of modularity in this code is its most obvious quality. My usual
recommendation for these kinds of questions is to pick a GROMACS tool that
does something close to what you want, look at how it populates a data
structure, do the same thing, and work out how to get the subset of data
you really want. new_status() probably (over-)fills your needs.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130527/044d178f/attachment.html>


More information about the gromacs.org_gmx-developers mailing list