[gmx-developers] mtop structure
Alexander Malafeev
malafeev.a at gmail.com
Mon Feb 23 13:58:05 CET 2009
Hello, please tell me how to read mtop structure?
> int index=0;
> for(j=0;j<mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->nmolblock;j++) *//enum all molecule types*
> {
> for(k=0;k<mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->molblock <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_molblock_t>[j].nmol;k++) *//enum all instances of each molecule type*
> {
> for(l=0;l<mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->moltype <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_moltype_t>[ mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->molblock <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_molblock_t>[j].type].atoms.nr;l++) *//enum atoms*
> {
> t_atom <http://wiki.gromacs.org/index.php/Gromacs_Intro#t_atom>* atom_info=&mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->moltype <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_moltype_t>[ mtop <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_mtop_t>->molblock <http://wiki.gromacs.org/index.php/Gromacs_Intro#gmx_molblock_t>[j].type].atoms.atom[l];
> rvec* atom_position=&state <http://wiki.gromacs.org/index.php/Gromacs_Intro#t_state>->x <http://wiki.gromacs.org/index.php/Gromacs_Intro#X>[index];
> index++;
> }
> }
> }
>
> Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20090223/ef22aa27/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list