mdpmem.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <assert.h>
#include "fpocket.h"
#include "fpout.h"
#include "writepocket.h"
#include "tpocket.h"
#include "dparams.h"
#include "descriptors.h"
#include "neighbor.h"
#include "pocket.h"
#include "cluster.h"
#include "refine.h"
#include "aa.h"
#include "utils.h"
#include "mdparams.h"
#include "mdpbase.h"
#include "memhandler.h"

Go to the source code of this file.

Functions

s_mdconcatinit_md_concat (void)
void alloc_first_md_concat (s_mdconcat *m, size_t n)
void realloc_md_concat (s_mdconcat *m, size_t n)
void free_mdconcat (s_mdconcat *m)


Function Documentation

void alloc_first_md_concat ( s_mdconcat m,
size_t  n 
)

## FUNCTION: alloc_first_md_concat

## SPECIFICATION: Allocate memory for the md concat structure (first snapshot)

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free, @ size_t n: Number of vertices in the snapshot to add to m

## RETURN: void

## FUNCTION: alloc_first_md_concat

## SPECIFICATION: Allocate memory for the md concat structure (first snapshot)

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free, @ size_t n: Number of vertices in the snapshot to add to m

## RETURN: void

Definition at line 490 of file mdpbase.c.

References my_malloc(), s_mdconcat::n_vertpos, and s_mdconcat::vertpos.

Referenced by store_vertice_positions().

00490                                                     {
00491     size_t z;
00492     m->vertpos = (float **) my_malloc(sizeof (float *) * n);
00493     for (z = 0; z < n; z++) {
00494         m->vertpos[z] = (float *) my_malloc(sizeof (float) *4);
00495         m->vertpos[z][0] = 0.0;
00496         m->vertpos[z][1] = 0.0;
00497         m->vertpos[z][2] = 0.0;
00498         m->vertpos[z][3] = 0.0;
00499     }
00500     m->n_vertpos = n;
00501 }

void free_mdconcat ( s_mdconcat m  ) 

## FUNCTION: free_mdconcat

## SPECIFICATION: Free the mdconcat structure

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free

## RETURN: void

## FUNCTION: free_mdconcat

## SPECIFICATION: Free the mdconcat structure

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free

## RETURN: void

Definition at line 545 of file mdpbase.c.

References my_free(), s_mdconcat::n_vertpos, and s_mdconcat::vertpos.

00545                                   {
00546     size_t i;
00547     for (i = 0; i < m->n_vertpos; i++) {
00548         my_free(m->vertpos[i]);
00549     }
00550     my_free(m->vertpos);
00551     my_free(m);
00552 }

s_mdconcat* init_md_concat ( void   ) 

COPYRIGHT DISCLAIMER

Vincent Le Guilloux, Peter Schmidtke and Pierre Tuffery, hereby disclaim all copyright interest in the program “fpocket” (which performs protein cavity detection) written by Vincent Le Guilloux and Peter Schmidtke.

Vincent Le Guilloux 28 November 2008 Peter Schmidtke 28 November 2008 Pierre Tuffery 28 November 2008

GNU GPL

This file is part of the fpocket package.

fpocket is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

fpocket is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with fpocket. If not, see <http://www.gnu.org/licenses/>.

## FUNCTION: init_md_concat

## SPECIFICATION: Initialize the md concat (alloc)

## PARAMETRES: void

## RETURN: s_mdconcat * : the md concat structure

## FUNCTION: init_md_concat

## SPECIFICATION: Allocate memory for the concatenated voronoi vertice structure Currently NOT USED

## PARAMETRES: void

## RETURN: s_mdconcat * : Structure containing allocated memory

Definition at line 374 of file mdpbase.c.

References my_malloc(), s_mdconcat::n_snapshots, s_mdconcat::n_vertpos, and s_mdconcat::vertpos.

00374                                  {
00375     s_mdconcat *m = (s_mdconcat *) my_malloc(sizeof (s_mdconcat));
00376     m->n_vertpos = 0;
00377     m->vertpos = NULL;
00378     m->n_snapshots = 0;
00379     return m;
00380 }

void realloc_md_concat ( s_mdconcat m,
size_t  n 
)

## FUNCTION: realloc_md_concat

## SPECIFICATION: Reallocate memory for the md concat structure (to add a new snapshot)

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free, @ size_t n: Number of vertices in the snapshot to add to m

## RETURN: void

## FUNCTION: realloc_md_concat

## SPECIFICATION: Reallocate memory for the md concat structure (to add a new snapshot)

## PARAMETRES: @ s_mdconcat *m: Pointer to the structure to free, @ size_t n: Number of vertices in the snapshot to add to m

## RETURN: void

Definition at line 518 of file mdpbase.c.

References my_malloc(), my_realloc(), s_mdconcat::n_vertpos, and s_mdconcat::vertpos.

Referenced by store_vertice_positions().

00518                                                 {
00519     size_t z;
00520     m->vertpos = (float **) my_realloc(m->vertpos, sizeof (float *) *(m->n_vertpos + n));
00521     for (z = 0; z < n; z++) {
00522         m->vertpos[m->n_vertpos + z] = (float *) my_malloc(sizeof (float) *4);
00523         m->vertpos[m->n_vertpos + z][0] = 0.0;
00524         m->vertpos[m->n_vertpos + z][1] = 0.0;
00525         m->vertpos[m->n_vertpos + z][2] = 0.0;
00526         m->vertpos[m->n_vertpos + z][3] = 0.0;
00527     }
00528     m->n_vertpos += n;
00529 }


Generated on Mon Jun 7 16:44:23 2010 for fpocket by  doxygen 1.5.6