[gmx-developers] snew/sfree functions

Valentin Gogonea v.gogonea at csuohio.edu
Wed Jun 12 22:54:25 CEST 2002


Thanks again Erik,

Are snew/sfree functions part of gnu C or they are defined in gromacs. I 
could not find there definition, it looks like they perform memory 
allocation/deallocation. Is that correct?

Thanks,

Valentin


On Wednesday, June 12, 2002, at 03:20 PM, Erik Lindahl wrote:

> Valentin Gogonea wrote:
>> Thanks to Erik and Gerrit for the answers.
>> Can somebody can give my a list of the routines/functions that must be 
>> called to write an index file.  I know that is trivial to do the 
>> printing but I try to use as much as possible routines which are 
>> already there in gromacs.
>
> Sure.
>
> The basic structure for representing collections of atoms in gromacs is 
> a block. One of Gerrit's slides shows this I think, and the block 
> structure is defined in include/types/blocks.h.
>
> In your case you can neglect the 'multinr' stuff - it is only used for 
> splitting blocks over processors.
>
> There is a routine called pr_block in include/txtdump.h that you can use
> to print an entire block of atoms - can be handy for trial and error :-)
>
> Once you have a block with your atoms it is trivial to write it to an 
> index file - just call write_index() defined in include/index.h.
>
> The nice thing about using blocks is that it is trivial to read your 
> index file back into a block - for some reason those routines are 
> defined in include/rdgroup.h ('read groups'), though...
>
> Cheers,
>
> Erik
>




More information about the gromacs.org_gmx-developers mailing list