NanoShaper  0.3.1
NanoShaper is a tool able to triangulate and inspect an arbitray triangulated surface or several types of molecular surfaces such as the Gaussian, Skin and the SES
C:/Documents and Settings/sdecherchi/My Documents/Ricerca/software nostro/NanoShaper 0.3.1/NanoShaper/src/DelphiShared.h
00001 
00002 #ifndef  DelphiShared_h
00003 #define  DelphiShared_h
00004 
00005 #include "globals.h"
00006 #include "tools.h"
00007 
00008 #define DEFAULT_PERFIL 80
00009 #define DEFAULT_SCALE 2.0
00010 
00011 // Status map codes
00012 #define STATUS_CAVITY_POINT_SHAPE_UNDER_CHECK -10
00013 #define STATUS_CAVITY_POINT_SHAPE_OK -5
00014 #define STAUTS_POINT_INSIDE -1
00015 #define STATUS_POINT_TEMPORARY_OUT 2
00016 #define STATUS_POINT_OUT 3
00017 
00020 class DelPhiShared {   
00021 public:
00022         DelPhiShared();
00023         DelPhiShared(double scale,double perfill, char* fn,bool map,bool status);
00024         
00027         void DelPhiBinding(     double xmin,double ymin,double zmin,
00028                                                 double xmax,double ymax,double zmax,
00029                                                 double c1,double c2,double c3,double rmax,double perf,
00030                                                 int* local_i_epsmap,int igrid,double scale,
00031                                                 double* local_i_scspos,double* local_i_scsnor,
00032                                                 bool* local_i_idebmap,int* local_i_ibgp,int maxbgp);
00033 
00038         void finalizeBinding();
00040         void saveEpsMaps(char* fname);
00042         void saveBGP(char* fname);
00043         void saveStatus(char* fname);
00044         bool clearAndAllocEpsMaps();
00045         void clearEpsMaps();
00046         bool loadAtoms(char fn[BUFLEN]);
00047         bool loadAtoms(int na,double* pos,double* r,double* q,int* d);
00049         bool buildGrid(double scale,double perfill);
00050         bool getDelphiBinding()
00051         {
00052                 return delphiBinding;
00053         }
00054 
00055         void buildEpsmap(bool a)
00056         {
00057                 buildEpsMap = a;
00058         }
00059 
00060         void buildStatusmap(bool a)
00061         {
00062                 buildStatus = a;
00063         }
00064 
00065         double scale;
00066         double perfill;
00067         bool delphiBinding;
00068         bool buildEpsMap;
00069         bool buildStatus;
00070         // epsmap is a four dimensional matrix
00071         int *epsmap,*ibgp;
00072         bool *idebmap;
00073         int maxbgp;
00074         double *scsnor,*scsarea,*scspos;
00075         // face area = side*side;
00076         double A;       
00077         double* x;
00078         double* y;
00079         double* z;
00080         int nbgp;
00081         double side;
00082         int nx,ny,nz;
00083         // the status matrix is the status for each grid point:
00084         // -5 -> cavity point is inside a well shaped cavity (temporary)
00085         // -10 -> cavity point under shape check (temporary)
00086         // -1 -> point is inside
00087         // 2 -> point is temporary outside (may be really out or in cavity)
00088         // 3 -> point is really out
00089         // 4 -> point is in cavity number 1
00090         // 5 -> point is in cavity number 2
00091         // 6 -> point is in cavity number 3
00092         // and so on....
00093         // Thus 65536-4 cavities can be detected at best; it should be enough...
00094         short*** status;
00095         int numCavities;
00096         double rmaxdim;
00097         double xmin,xmax,ymin,ymax,zmin,zmax;
00098         double baricenter[3];
00099         // atoms vector. Pointer to pointers to atoms
00100         Atom** atoms;
00101         // num atoms
00102         int numAtoms;
00103         char file[BUFLEN];
00104         double hside;
00106         vector < vector <int* >* >* cavitiesVec;
00108         vector < double> cavitiesSize;
00110         vector <bool> cavitiesFlag;
00111 
00112         virtual ~DelPhiShared();
00113 }; 
00114 
00115 #endif