File: jacgrid.h

package info (click to toggle)
mldemos 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,224 kB
  • ctags: 46,525
  • sloc: cpp: 306,887; ansic: 167,718; ml: 126; sh: 109; makefile: 2
file content (112 lines) | stat: -rw-r--r-- 3,241 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef JAC_JACGRID_H
#define JAC_JACGRID_H

#include <stdlib.h>
#include <string.h>
#include <limits.h>


#include <string>
#include <vector>

#include "atom.h"
#include "grid.h"
#include "surface.h"
#include "plane.h"

unsigned int JACGetGridDimension();
void         JACSetGridDimension(unsigned int);
float        JACGetProbeRadius();
void         JACSetProbeRadius(float r);

////////////////////////////////////////////////////
// surfacing and volumes
////////////////////////////////////////////////////
namespace JACSurfaceTypes
{
    const unsigned int SURF_ACCESSIBLE = 0;
    const unsigned int SURF_MOLECULAR = 1;
    const unsigned int SURF_VDW = 2;
    const unsigned int SURF_CONTOUR = 3;
    const unsigned int SURF_TYPES_MAX = 3;
}

bool JACMakeAccessibleSurface(surfaceT &surf, const JACAtomsBase &atoms);

bool JACMakeMolecularSurface(surfaceT &surf, const JACAtomsBase &atoms);

bool JACMakeSurface(surfaceT &surf, unsigned int itype,
                    const gridT &grd, float threshold);

void JACSetGridParams(gridT &grid, unsigned int itype,
                      bool uniform, const JACAtomsBase &atoms);

void JACSurfaceNormalize(surfaceT &surface);

float JACCalculateVolume(unsigned int itype, const JACAtomsBase &atoms);

float JACCalculateAccessibleVolume(const JACAtomsBase &atoms);

float JACCalculateMolecularVolume(const JACAtomsBase &atoms);

float JACCalculateVdWVolume(const JACAtomsBase &atoms);

float JACSurfaceArea(const surfaceT &surface,
                     unsigned int *selection = 0,
                     unsigned int sel_mask = 1);

float JACSurfaceVolume(const surfaceT &surface,
                       unsigned int *selection = 0,
                       unsigned int sel_mask = 1);

void JACSurfaceSwapFace(surfaceT &surface,
                        unsigned int *select = 0,
                        unsigned int sel_mask = 1);

void JACInvertTriangles(surfaceT &surface,
                        unsigned int *select = 0,
                        unsigned int sel_mask = 1);

void JACOverlapGrid(gridT &grid,
                    const JACAtomsBase &atoms1,
                    const JACAtomsBase &atoms2);

void JACDifferenceGrid(gridT &grid,
                       const JACAtomsBase &atoms1,
                       const JACAtomsBase &atoms2);

void JACOverlapSurface(surfaceT &surface,
                       const JACAtomsBase &atoms1,
                       const JACAtomsBase &atoms2);

void JACDifferenceSurface(surfaceT &surface,
                          const JACAtomsBase &atoms1,
                          const JACAtomsBase &atoms2);

void JACSmoothSurface(surfaceT &surface,
                      unsigned int begin = 0,
                      unsigned int end = UINT_MAX);

class VertexSender
{
public:
    virtual ~VertexSender()
    {
    }
    virtual void BeginLine()
    {
    }
    virtual void EndLine()
    {
    }
    virtual void SendVertex(const float *v) = 0;
};


float JACSurfaceArea(const JACAtomsBase &atoms,
                     const JACAtomsBase &context,
                     float *surface_area,
                     float &fractional,
                     VertexSender *vs = 0,
                     unsigned int pres = 1);
#endif // ifndef JAC_JACGRID_H