Allink  v0.1
VarData.h
1 /***********************************************************************
2 VarData: Header file for the VarData class.
3  Copyright (C) 2008 by Giovanni Marelli <sabeiro@virgilio.it>
4 
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ***********************************************************************/
20 #ifndef VARDATA_H
21 #define VARDATA_H
22 
23 #include "Matematica.h"
24 #include <vector>
25 #include <list>
26 
27 #ifdef USE_BOOST
28 #include <boost/iostreams/filtering_stream.hpp>
29 #include <boost/iostreams/filter/bzip2.hpp>
30 using namespace boost::iostreams;
31 #endif
32 
33 ;
34 #define CHAIN_IF_TYPE(c,t) ( ((c)&(t))==(t) )
35 #define VAR_IF_TYPE(c,t) ( ((c)&(t))==(t) )
36 #define VAR_ADD_TYPE(c,t) ( (c)|=(t) )
37 #define VAR_REM_TYPE(c,t) ( (c)&=(~t) )
38 enum ShiftType{
41  SHIFT_NO =0,
43  SHIFT_CM =1,
45  SHIFT_NANO =2,
47  SHIFT_CM_NANO =3,
48 };
50 enum BackFoldType{
52  BF_NO =0,
54  BF_PART =1,
56  BF_CHAIN =2,
58  BF_NANO =3,
60  BF_SKIP =4,
62  BF_TILT =5,
63 };
65 enum BeadType{
67  BEAD_PHOB =0,
69  BEAD_PHIL =1,
71  BEAD_OIL =2,
73  BEAD_NANO ,
75  BEAD_EVERY ,
76 };
78 enum ChainType{
80  CHAIN_EVERY =0x00000,
82  CHAIN_POLY =0x00001,
84  CHAIN_HOMO =0x00002,
86  CHAIN_ADDED =0x00006,
88  CHAIN_UP =0x00005,
90  CHAIN_DOWN =0x00009,
92  CHAIN_INNER =0x00011,
94  CHAIN_OUTER =0x00021,
96  CHAIN_STRETCH =0x00200,
98  CHAIN_FLABBY =0x00400,
100  CHAIN_TILTED =0x00800,
101 };
103 enum VarFileFormat{
105  VAR_SYS_XVT = 0x0001,
107  VAR_SYS_TXVL = 0x0002,
109  VAR_SYS_XYZ = 0x0004,
111  VAR_SYS_XYZT = 0x0008,
112 };
114 enum VarSysPropr{
116  VAR_EDGE = 0x0001,
118  VAR_PART_ALLOCATED = 0x0002,
120  VAR_CH_ALLOCATED = 0x0004,
122  VAR_MEMBRANE = 0x0008,
124  VAR_OPEN_TRUST = 0x0010,
126  VAR_LINK_ALLOCATED = 0x0020,
128  VAR_CHAIN_DEF = 0x0040,
130  VAR_NBLOCK_ALL = 0x0080,
131 };
133 enum VarCreate{
135  VAR_ABSORBING = 0x0001,
137  VAR_REFLECTING = 0x0002,
139  VAR_ADDED = 0x0004,
141  VAR_DISTRIBUTED= 0x0008,
143  VAR_SOLVENT = 0x0010,
145  VAR_PLANAR = 0x0020,
147  VAR_PLANAR_PE = 0x0040,
149  VAR_TUBE = 0x0080,
151  VAR_VESICLE = 0x0100,
153  VAR_COATING = 0x0200,
155  VAR_TWOTAILS = 0x0400,
157  VAR_OBSTACLE = 0x0800,
159  VAR_OPPOSED = 0x0f00,
160 };
162 enum BlockArch{
164  ARCH_POINTS = 0x0001,
166  ARCH_LINES = 0x0002,
168  ARCH_TWOTAILS = 0x0004,
170  ARCH_CLUSTER = 0x0008,
171 };
173 enum NanoShape{
175  SHAPE_NONE = 0x00001,
177  SHAPE_SPH = 0x00002,
179  SHAPE_HEI = 0x00004,
181  SHAPE_CYL = 0x00008,
183  SHAPE_TILT = 0x00010,
185  SHAPE_PILL = 0x00020,
187  SHAPE_WALL = 0x00040,
189  SHAPE_PORE = 0x00080,
191  SHAPE_SMOOTH = 0x00100,
193  SHAPE_CLUSTER = 0x00200,
195  SHAPE_EXT = 0x00400,
197  SHAPE_JANUS = 0x00800,
199  SHAPE_CLINKS = 0x01000,
201  SHAPE_STALK = 0x02000,
203  SHAPE_TIP = 0x04000,
205  SHAPE_TORUS = 0x08000,
207  SHAPE_HARM = 0x10000,
209  SHAPE_UMBR = 0x20000,
211  SHAPE_BOUND = 0x40000,
212 };
214 typedef struct{
216  double Pos[3];
218  double Bkf[3];
220  double Vel[4];
222  int Idx;
224  int CId;
226  int Typ;
227 }PART;
229 typedef struct{
231  int *Link;
233  int NLink;
234 }LINKS;
236 typedef struct{
238  double Pos[4];
240  double Dir[3];
242  double Vel[3];
243  // Angle with the normal;
244  double Angle;
246  int Type;
248  int NPCh;
250  int InitBead;
252  int EndBead;
253 }CHAIN;
255 typedef struct{
257  char Name[60];
259  int NPCh;
261  int NPart;
263  int NChain;
265  int InitIdx;
267  int EndIdx;
269  int Arch;
271  int nNano;
273  int Asym;
274 } BLOCK;
276 typedef struct{
278  char Name[60];
280  double Pos[3];
282  double Vel[3];
284  double Size[3];
286  int Topology;
288  int NPart;
290  int NChain;
292  int NPCh;
294  int InitIdx;
296  int EndIdx;
297 } SOFT;
299 typedef struct{
301  double Time;
303  double Temp;
305  double Beta;
307  double Energy[3];
309  double Edge[4];
311  double InvEdge[4];
313  double Cm[3];
315  double Vel[4];
317  double Pre[3];
319  double vBB;
321  double SurfTens;
323  double chiN;
325  double kappaN;
327  double rho;
329  double kappaBend;
331  double kappaSpring;
333  double SpringRest;
335  double ReOverCutOff;
337  double Deltat;
343  unsigned long Step;
345  int NPart;
347  int NChain;
349  int NPCh;
351  int NAllocP;
353  int NAllocC;
355  int NType;
357  int NLink;
359  int NBlock;
360  // Number of nanoparticles
361  int NNano;
362 }GENERAL;
365  public:
367  Properties(){RePhob=0.;RePhil=0.;VolPhob=0.;VolPhil=0.;FactPhob=0.;FactPhil=0.;GyrPhob=0.;GyrPhil=0.;ChDiff=0.;};
369  void Print(){printf("RePhob %lf RePhil %lf\n",RePhob,RePhil);
370  printf("RadGyrPhob %lf RadGyrPhil %lf\n",GyrPhob,GyrPhil);
371  printf("StructFactPhob %lf StructFactPhil %lf\n",FactPhob,FactPhil);
372  printf("VolPhob %lf VolPhil %lf\n",VolPhob,VolPhil);
373  printf("ChainDiff %lf\n",ChDiff);};
375  double RePhob;//End to end distance
376  double RePhil;
377  double VolPhob;//volume fraction
378  double VolPhil;
379  double FactPhob;//structure factor
380  double FactPhil;
381  double GyrPhob;//radius of gyration
382  double GyrPhil;
383  double ChDiff;//lateral diffusion of the chains
384  Properties operator+(const Properties&) const;
385  Properties operator*(const double&) const;
386 };
388 class MatInt{
389  private:
391  double *IntMatr2;
393  double *IntMatr3;
395  int NType;
397  int NOrd;
398  public:
400  MatInt(int NType,int NOrd);
402  void FillEntries(double *Matr,int Ord);
404  int IntType(int t1,int t2);
406  int IntType(int t1,int t2,int t3);
408  double Coeff(int t1,int t2);
410  double Coeff(int t1,int t2,int t3);
412  void SetCoeff(double Co,int t1,int t2);
414  void SetCoeff(double Co,int t1,int t2,int t3);
416  void Print();
418  int pNType(){return NType;};
420  void Rescale(double SFactor,int Order);
421 };
423 typedef struct{
425  char ArchFile[60];
427  double Pos[3];
429  double Bkf[3];
431  double Vel[3];
433  double Force[3];
435  double Axis[3];
437  double AMom[3];
439  double AMomTemp[3];
441  double AVel[3];
443  double Mass;
445  double Rad;
447  double Hamaker;
449  double Height;
451  double Gamma;
453  double Zeta;
455  double Viscosity;
457  double OffSet;
459  double CutOff;
461  double Coating;
463  double BaseLine;
465  double DistThr;
467  double ForThr;
469  double PotThr;
471  double Area;
473  int Shape;
475  int NLink;
477  int NHeight;
479  int NCircle;
481  int nBlock;
482 }NANO;
484 typedef struct {
486  double x[3];
487 } XYZ;
489 typedef struct {
491  XYZ p[8];
493  XYZ n[8];
495  double val[8];
496 } GRIDCELL;
498 typedef struct {
500  XYZ p[3];
504  int v[3];
506  XYZ n[3];
507 } VAR_TRIANGLE;
509 typedef struct {
511  XYZ p[2];
515  int v[2];
517  XYZ n[2];
518 } VAR_LINE;
519 //-----------------Class-VarData----------------------------------
521 class VarData{
522  private:
524  GENERAL *Gen;
525  public:
531  VarData();
533  ~VarData();
534  //-------------------------VarData.cpp-------------------
536  void VarMessage(const char * s, ...);
538  bool Open(char *InFile,int BF);
540  bool OpenRisk(char *InFile,int BF);
542  bool OpenTrust(char *InFile,int BF);
544  void AllocPart();
546  void AllocChain();
548  Properties SysProperties();
550  void SysInfo(char *cSystem);
552  void SysDef(char *cSystem);
554  char *SysState();
556  void SetCoeff();
558  void SetCoeff(double *v2,double *v3);
560  double TwoPartDist(int p1,int p2,double *RelDist);
562  double TwoPartDist(double *Pos,int p2,double *RelDist);
564  double TwoPartDist2(int p1,int p2,double *RelDist);
566  double TwoPartDist2(double *Pos,int p2,double *RelDist);
568  int TwoPartDist(int p1,int p2,double *RelDist,double CutOff);
570  int TwoPartDist(double *Pos,int p2,double *RelDist,double CutOff);
571  //----------------------VarDataWrite.cpp-----------------
573  bool Write(char *OutFile);
575  bool WriteTxvl(char *OutFile);
577  bool WriteXvt(char *OutFile);
579  bool WriteXyz(char *OutFile);
581  void HeaderInteraction(FILE *FileToWrite);
583  void StringNano(char *NString,int n);
585  int HeaderNano(FILE *FileToWrite);
587  int HeaderSoft(char *Line);
589  void WriteLinkedSurf(FILE *FWrite,double *Plot,int NSample,int NType,double *Bound,int *PId);
591  void WriteSurf(FILE *F2Write,double **Plot,int NSample,int OffSet);
593  void ShapeId(int iShape,char *Shape);
594 #ifdef USE_BOOST
595  void OpenComprWrite(char *FName,filtering_ostream ZipFile);
598  void OpenComprRead(char *FName,filtering_istream ZipFile);
600  void CloseCompr(filtering_istream ZipFile);
602  void CloseCompr(filtering_ostream ZipFile);
603 #endif
604  //------------------------VarDataBackFold.cpp------------
606  bool BackFold(int How);
608  int BfDefChain();
610  int BfEdge();
612  void DistFromNp();
614  void ShiftRef(int BackFold);
616  int StalkPos(double *OldPos);
618  void BfPep();
620  void BackBone(double *Line,int NBin);
622  void StalkLineProf(double *Line,int NBin);
624  void StalkPos2(double *OldPos,double *CmStalk);
626  void StalkPos3(double *OldPos,double *CmStalk);
628  int StalkPos4(double *OldPos,double *CmStalk);
630  double NormalWeight(VAR_TRIANGLE *Triang,double *Weight,int NGrid,int NTri);
632  void ConnectLineChain(VAR_LINE *Triang,int NGrid,int NTri);
634  void ConnectLineChain2(VAR_LINE *Triang,int NGrid,int NTri);
636  void ConnectLineChain3(VAR_LINE *Triang,int NGrid,int NTri);
638  double PorePos();
639  //-----------------VarDataString.cpp------------------
641  int Fetch(char *str,char *mask,char *fmt, ... );
643  int BraketPos(char *str,char *mask,int *sPos,int *sLen);
645  int Fetch(char *str,char *mask,int NArg,double *Val);
647  bool ReadString(const char *String,char *cLine,double *Value);
649  bool ReadString(const char *String,double *Value,char *line);
651  bool ReadString(const char *String,char *cLine,int *Value);
653  int ReadVal(char *pLine,double *Value);
654  //-----------------VarDataRead.cpp-------------------
656  int ReadLineXvt(char *cLine,double *Pos,int *Type);
658  bool ReadConf(char *InFile);
660  void ReadHeader(FILE *FileToRead);
662  void ReadHeaderTxvl(FILE *FileToRead);
664  void ReadHeaderXvt(FILE *FileToRead);
666  int ReadPart(FILE *FileToRead);
668  int ReadPartTxvl(FILE *FileToRead);
670  int ReadPartXvt(FILE *FileToRead);
672  int ReadPartXyz(FILE *FileToRead);
674  int ReadPartXyzt(FILE *FileToRead);
676  int ReadPassThru(FILE *FileToRead);
678  int ReadSoft(FILE *ConfFile);
680  void ReadNano(FILE *ConfFile,int NCircle,int NHeight);
682  int NanoString(char *cLine,int n);
684  void SubNanoHeader(char *cFile);
686  int ShapeId(char *Shape);
687  //--------------------VarDataCreate.cpp------------------------
689  int DefSoft(char *nome2,char *ConfF);
691  int TrialSys();
693  bool CreateSoft(int *arch,double Thickness,int s);
695  void CreateTube(int *arch,double Thickness,int s);
697  void CreatePlanar(int *arch,double Thickness,int s);
699  void CreateVesicle(int *arch,double Thickness,int s);
701  void CreateCoating(int *arch,double Thickness,int s);
703  void CreateObstacle(int *arch,double Thickness,int s);
705  int CheckNano(double *Pos,int s);
707  void AddProtein(int NCircle,int NHeight,int nNano,char *filename);
709  void CreateProtein(int nNano,int nStart);
711  void AddStuffing(char *filename,int nStuffing,int nNano);
713  void AddSolvent(char *filename,int nWater);
715  void AddChains(char *filename,double Thickness);
717  void AddCholesterol(char *filename,double Thickness,int s);
719  void DefBlock(int *NChStep,int How);
721  void DefRest(int *arch,int s);
723  int PutPart(int j,int p,int HalfLim,double sigma);
725  void FindNeighbours(char *FileName);
726  //---------------------VarDataEl.cpp----------------------------
728  void SwapChain(int c1,int c2,int b);
730  void SwapChain(int c1,int c2);
732  void SwapPart(int p1,int p2);
734  void ChangeNChain(int NChain,int b);
736  bool ShiftSys(int How);
738  void SampleSurface(double *Plot,int NSample,int Type);
740  MOMENTI SampleSurfacePart(double *Plot,int NSample,int Type);
742  MOMENTI SampleSurface(Matrice *Plot,int NSample,int Type);
744  MOMENTI SampleSurfaceMem(int NSample);
746  void LoadDensFile(double **Plot,int NBin);
748  int SpatialDerivative(Matrice *Surface,Matrice *Resp,SPLINE Weight,int NSample);
750  void ShiftBlock(Vettore *Shift,int b);
752  void RotateBlock(Vettore *Axis,Vettore *Origin,int b);
754  void MirrorBlock(Vettore *Px1,Vettore *Px2,Vettore *Px3,int b);
756  void Transform(int block);
758  void Point2Shape(int iShape);
760  typedef double(VarData::*NANO_DIST)(double *Pos,int n);
762  NANO_DIST Nano_Dist;
764  double NanoDist2(double *Pos,int n){return (*this.*Nano_Dist)(Pos,n);}
766  double NanoDist2(double x,double y,double z,int n);
768  double FieldNo(double *Pos,int n);
770  double FieldSphere(double *Pos,int n);
772  double FieldElips(double *Pos,int n);
774  double FieldParab(double *Pos,int n);
776  double FieldCyl(double *Pos,int n);
778  double FieldTransMem(double *Pos,int n);
780  double FieldJanus(double *Pos,int n);
782  double FieldTorus(double *Pos,int n);
784  double FieldTilt(double *Pos,int n);
786  double FieldBound(double *Pos,int n);
788  double FieldTiltWall(double *Pos,int n);
789  //---------------------VarDataExp.cpp----------------------------
791  int PairCorrelation(double *Point,int NSample,int How,int Type);
793  int PairCorrelationRound(double **Point,int NSample,int Type);
795  int PairCorrelationSquare(double **Point,int NSample,int Type);
797  int PairCorrelationPep(double **Point,int NSample,int Type);
799  int Scattering2d(double **Point,int NSample,int Type);
801  int Scattering2D(double **Point,int NSample,int Type);
803  void Spettro2d(double *Points,int NSample,int Type);
805  void Spettro2d(double *Plot,int NSample);
806  //---------------------VarDataContour.cpp------------------------
808  int DensityProfile(int coord,int NSample,int NType,double *dDensity);
810  int Core(double ***Plot,int NSample,double Border[3][2]);
812  int RadDistr(int NSample,double *Plot,double Border[2],int How);
814  int Worm(int Partition,int NSample,double *Border,double *dPoint);
817  void VolumeCircSlab(double *VolContr,int NSample);
819  void Stalk(int NSample,int NLevel,double **Plot,double Threshold);
820  //---------------------VarDataPos.cpp----------------------------
822  int Arrange(int **Triangle,int Vertex);
824  int Folding();
826  int OrderPos();
828  int CalcnPos(double *Pos);
830  int Neighbour(double *Pos);
832  int NChainPSquare(double *Plot);
834  int LateralFluctuation(double *Plot,int LatValue);
836  int Voronoi();
838  int PosVectInt(double *Pos);
839  //------------------VarInterp.cpp----------------------------
841  int InterParab(PART *PmIn,PART *PmOut,int NIn,int nOut);
843  int InterParab2(PART *PmIn,PART *PmOut,int NIn,int NOut);
845  int InterCubica(PART *PmIn,PART *PmOut,int NIn,int NOut);
847  int InterForth(PART *PmIn,PART *PmOut,int NIn,int NOut);
849  int InterSpline3(PART *PmIn,PART *PmOut,int NIn,int NOut);
851  int InterSpline4(PART *PmIn,PART *PmOut,int NIn,int NOut);
853  int InterBSpline(PART *PmIn,PART *PmOut,int NIn,int NOut);
855  int InterBSpline2D(double **PlIn,double **PmOut,int NIn,int NOut);
857  int InterBSpline2D(double *PlIn,double *PmOut,int NIn,int NOut);
859  int InterBSpline1D(double *PlIn,double *PmOut,int NIn,int NOut);
861  int InterPoly(PART *PmIn,PART *PmOut,int NIn,int nOut);
863  int InterDerMatrix(PART *Pm, int NMass,SPLINE Weight,double Offset);
865  void SmoothGrid(int NSample,char *FWrite);
867  void SmoothGrid(int NSample);
869  void ConvoluteMatrix(double *Plot,int NGrid,Matrice *Mask,int NDim);
871  void ConvoluteMatrix1(double *Plot,int NGrid,Matrice *Mask);
873  void ConvoluteMatrix2(double *Plot,int NGrid,Matrice *Mask);
875  void ConvoluteMatrix3(double *Plot,int NGrid,Matrice *Mask);
876  //-------------------VarDataComm.cpp----------------------
878  int SetNPart(int NewNPart);
880  int SetNChain(int NewNCh);
882  int SetNLink(int NewNCh);
884  void SetNPCh(int NewNCh);
886  void SetNType(int NewNType);
888  int AllocLinks(int NewNCh);
890  int SetNBlock(int Val);
892  int SetNNano(int Val);
894  void Copy(PART *P1,PART *P2,int NPartOld);
896  void Copy(CHAIN *C1,CHAIN *C2,int NChainOld);
897  //-------------------VarDataMarchCubes.cpp----------------
899  VAR_TRIANGLE *MarchingCubes(double *Plot,int NSample,double IsoLevel,int *NTri);
901  VAR_LINE *MarchingSquares(double *Plot,int NSample,double IsoLevel,int *NTri);
902  //-------------------VarDataCGAL.cpp----------------------
903  //#ifdef __CGAL_h__
905  void AreaDistr(double *Distr,double *RadDistr,int NSample);
906  //#endif //CGAL
908  double pTime(){return Gen->Time;};
910  double pDeltat(){return Gen->Deltat;};
912  double pTemp(){return Gen->Temp;};
914  double pBeta(){return Gen->Beta;};
916  double pEnergy(int d){return Gen->Energy[d];};
918  double pEdge(int d){return Gen->Edge[d];};
920  double pInvEdge(int d){return Gen->InvEdge[d];};
922  double pVol(){return Gen->Edge[0]*Gen->Edge[1]*Gen->Edge[2];};
924  double pCm(int d){return Gen->Cm[d];};
926  double pVelMax(int d){return Gen->Vel[d];};
928  double pchiN(){return Gen->chiN;};
930  double pkappaN(){return Gen->kappaN;};
932  double pkBen(){return Gen->kappaBend;};
934  double pkSpr(){return Gen->kappaSpring;};
936  void SetkBen(double Val){Gen->kappaBend = Val;};
938  void SetkSpr(double Val){Gen->kappaSpring = Val;};
940  void SetSprRest(double Val){Gen->SpringRest = Val;};
942  double pSprRest(){return Gen->SpringRest;};
944  double prho(){return Gen->rho;};
946  double pReOverCutOff(){return Gen->ReOverCutOff;};
948  double pWei2Par(){return Gen->WFuncStraight2;};
950  double pWei3Par(){return Gen->WFuncStraight3;};
952  int pStep();
954  int pNPart();
956  int pNChain();
958  int pNChain(int b);
960  int pNPCh();
962  int pNPCh(int c);
964  int pNType();
966  int pNLink();
968  int pNNano();
970  int pNBlock();
972  int pNAllocP();
974  int pNAllocC();
976  void SetEdge(double Val,int d){Gen->Edge[d] = Val;Gen->InvEdge[d] = 1./Val;};
978  void SetCNorm(int d){
979  if(d<0 || d > 2) return;
980  CNorm = d;
981  CLat1 = (d+1)%3;
982  CLat2 = (d+2)%3;
983  };
985  void SetScaleF(double *Scale){
986  for(int d=0;d<3;d++){
987  ScaleF[d] = Scale[d];
988  }
989  }
991  void SetShiftPos(double *RefPos){
992  for(int d=0;d<3;d++){
993  ShiftPos[d] = RefPos[d];
994  }
995  }
996  void SetIfNormalize(int If){
997  IfNormalize = If;
998  }
1000  void SetDeltat(double Val){Gen->Deltat = Val;};
1002  void SetStep(int Val){Gen->Step = Val;};
1004  void SetTemp(double Val){Gen->Temp = Val;Gen->Beta = 1./Val;};
1006  void SetTime(double Val){Gen->Time = Val;};
1008  void IncrStep(){Gen->Step++;};
1010  double pPos(int p,int d);
1012  double pChPos(int p,int d);
1014  void pPos(int p,double *Pos);
1016  double *pPos(int p);
1018  double pPosNoBkf(int p,int d);
1020  double pVel(int p,int d);
1022  void SetPos(int p, double *Pos);
1024  void SetPos(int p,int d,double Pos);
1026  void SetVel(int p, double *Vel);
1028  void SetType(int p,int t);
1030  int pType(int p);
1032  int pChain(int p);
1034  double pNanoPos(int n,int d);
1036  void SetBkf(int p);
1038  void SetNanoBkf(int n);
1040  void pPos(double *Pos);
1042  char cWhat2Draw[STRSIZE];
1056  double *PlotMem;
1058  double ShiftPos[3];
1060  double ScaleF[3];
1062  int NSoft;
1074  int CNorm;
1076  int CLat1;
1078  int CLat2;
1080  int NChType;
1082  int NPType;
1084  int NEdge;
1086  int SysType;
1095 };
1096 #endif //VARIABILI_H
CHAIN * Ch
Information on all chains.
Definition: VarData.h:1050
int CId
Chain Identifier.
Definition: VarData.h:224
void SetScaleF(double *Scale)
Set scale factor.
Definition: VarData.h:985
double pTime()
Total time.
Definition: VarData.h:908
double pkBen()
Bending coupling.
Definition: VarData.h:932
Information about the nanoparticle.
Definition: VarData.h:423
double Deltat
Timestep.
Definition: VarData.h:337
double kappaN
Incompressibility.
Definition: VarData.h:325
General information of the system.
Definition: VarData.h:299
double NanoDist2(double *Pos, int n)
Pointer to a generic function.
Definition: VarData.h:764
int Type
Type of the chain (see list CHAIN_)
Definition: VarData.h:246
double prho()
Density coexistence.
Definition: VarData.h:944
BLOCK * Block
Information for every block.
Definition: VarData.h:1054
A Cartesian tern.
Definition: VarData.h:484
int Topology
topology
Definition: VarData.h:286
int NAddChol
Additional cholesterol chains into the membrane.
Definition: VarData.h:1068
LINKS * Ln
Array of linking between the particles.
Definition: VarData.h:1048
double Viscosity
Viscosity.
Definition: VarData.h:455
NANO * Nano
Extra particle.
Definition: VarData.h:1044
Define a triangle.
Definition: VarData.h:509
double chiN
Incompatibility.
Definition: VarData.h:323
Energy contribution from the density functional hamiltonian.
Definition: VarData.h:388
double Gamma
Friction term.
Definition: VarData.h:451
double Hamaker
Strength of the interaction.
Definition: VarData.h:447
double DistThr
Minimum distance threshold.
Definition: VarData.h:465
Geometrical operations on vectors.
Definition: MatematicaVect.h:9
double Edge[4]
xyzr edges of the simulation box
Definition: VarData.h:309
Properties()
Set the values to zero.
Definition: VarData.h:367
double WFuncStraight2
Weighting function straight length.
Definition: VarData.h:339
int Asym
Diblock limit of the chain.
Definition: VarData.h:273
double Time
Total time.
Definition: VarData.h:301
double Mass
Mass.
Definition: VarData.h:443
void SetTime(double Val)
Set Time.
Definition: VarData.h:1006
double Temp
Temperature.
Definition: VarData.h:303
double Rad
Size.
Definition: VarData.h:445
double pInvEdge(int d)
Inverted xyzr edges of the simulation box.
Definition: VarData.h:920
int Arch
Architecture type.
Definition: VarData.h:269
double Height
Height of the cylinder.
Definition: VarData.h:449
Information for every soft object.
Definition: VarData.h:276
int NChType
Type of chain selected.
Definition: VarData.h:1080
Define a triangle.
Definition: VarData.h:498
double pCm(int d)
Center of mass of the system.
Definition: VarData.h:924
int CLat2
lateral coordinate
Definition: VarData.h:1078
Information for every block.
Definition: VarData.h:255
double Beta
Temperature.
Definition: VarData.h:305
int IfPlotMem
If PlotMem is allocated and filled.
Definition: VarData.h:1094
int InitIdx
Initial Position.
Definition: VarData.h:294
int NLink
Maximum number of bonds.
Definition: VarData.h:357
double pkSpr()
Spring coupling.
Definition: VarData.h:934
double pSprRest()
Rest distance of the harmonic potential.
Definition: VarData.h:942
NANO_DIST Nano_Dist
Pointer to a distance/field function.
Definition: VarData.h:762
double * PlotMem
Particle position/density on the square lattice.
Definition: VarData.h:1056
int NAllocP
Number of allocated particles.
Definition: VarData.h:351
Some calculated properties of the system.
Definition: VarData.h:364
int InitBead
Initial bead.
Definition: VarData.h:250
int NAddChain
Additional homopolymer chains into the membrane.
Definition: VarData.h:1066
int pNType()
Print n type.
Definition: VarData.h:418
Information of every chain.
Definition: VarData.h:236
double Area
Area of a pore or a stalk.
Definition: VarData.h:471
void SetShiftPos(double *RefPos)
Set reference pos.
Definition: VarData.h:991
double pVol()
xyzr edges of the simulation box
Definition: VarData.h:922
int InitIdx
Initial particle position.
Definition: VarData.h:265
int SysCreate
Contains the information for the creation.
Definition: VarData.h:1090
double Vel[4]
Velocity of the system.
Definition: VarData.h:315
int Shape
0 none, 1 spherical, 2 cylindrical 3 wall
Definition: VarData.h:473
double SpringRest
Rest length of the harmonic potential.
Definition: VarData.h:333
void SetDeltat(double Val)
Set DeltaT.
Definition: VarData.h:1000
int nBlock
In which block is the peptide written.
Definition: VarData.h:481
int NChain
chains
Definition: VarData.h:290
int NStuffing
Stuffing for the cylinder.
Definition: VarData.h:1072
double pEdge(int d)
xyzr edges of the simulation box
Definition: VarData.h:918
int Idx
Particle identifier.
Definition: VarData.h:222
Moments of a distribution.
double vBB
Chemical potential of the water.
Definition: VarData.h:319
int NPType
Type of particle selected.
Definition: VarData.h:1082
double pWei3Par()
Parameter of the third order weighting function.
Definition: VarData.h:950
int NPartNearSphere
Number of particle to be considered in the radial density profile.
Definition: VarData.h:1064
int nNano
Nano index.
Definition: VarData.h:271
double pEnergy(int d)
Pot, kinetik, free.
Definition: VarData.h:916
double pchiN()
Incompatibility.
Definition: VarData.h:928
double BaseLine
Baseline of the potential.
Definition: VarData.h:463
MatInt * MInt
Matrix of the prefactor of the interactions.
Definition: VarData.h:529
int NChain
Number of chain.
Definition: VarData.h:347
int NEdge
Number of particles per edge.
Definition: VarData.h:1084
int NLink
Number of links connecting the constituent monomers.
Definition: VarData.h:475
double kappaSpring
Prefactor of the bond spring.
Definition: VarData.h:331
double InvEdge[4]
Inverted xyzr edges of the simulation box.
Definition: VarData.h:311
int NPart
particles
Definition: VarData.h:261
int NCircle
Number of monomers per circle.
Definition: VarData.h:479
void SetkSpr(double Val)
Spring coupling.
Definition: VarData.h:938
double Zeta
Stochastic term.
Definition: VarData.h:453
double ForThr
Maximum value of the force.
Definition: VarData.h:467
void SetTemp(double Val)
Set Temperature.
Definition: VarData.h:1004
int EndIdx
End position.
Definition: VarData.h:296
int NPCh
Number of particle per chain.
Definition: VarData.h:349
int SysType
Contains the definition of the system.
Definition: VarData.h:1086
double pWei2Par()
Parameter of the second order weighting function.
Definition: VarData.h:948
double Coating
Thickness of the LJ well.
Definition: VarData.h:461
double Cm[3]
Center of mass of the system.
Definition: VarData.h:313
int NPart
particles
Definition: VarData.h:288
double pBeta()
Beta factor 1/kTB.
Definition: VarData.h:914
void IncrStep()
Increment Step.
Definition: VarData.h:1008
int NPCh
part per chain
Definition: VarData.h:292
double Energy[3]
Pot, kinetik, free.
Definition: VarData.h:307
XYZ c
Centroid.
Definition: VarData.h:513
int NPCh
particles per chain
Definition: VarData.h:259
Matrice computes the algebric operations on matrices.
double PotThr
Maximum value of the potential.
Definition: VarData.h:469
All the vertex in a cell.
Definition: VarData.h:489
void SetStep(int Val)
Set Step.
Definition: VarData.h:1002
void SetCNorm(int d)
Set Edge.
Definition: VarData.h:978
int SysFormat
Contains the definition of the file format.
Definition: VarData.h:1088
int NSolvent
Solvent molecules.
Definition: VarData.h:1070
double OffSet
Reference potential.
Definition: VarData.h:457
int EndBead
End bead.
Definition: VarData.h:252
double pReOverCutOff()
Re/CutOff.
Definition: VarData.h:946
SOFT * Soft
Soft bodies.
Definition: VarData.h:1052
Matematica * Mat
Implementation of all usefull algorythms.
Definition: VarData.h:527
int NChain
chains
Definition: VarData.h:263
void SetSprRest(double Val)
Rest distance of the harmonic potential.
Definition: VarData.h:940
double WFuncStraight3
Weighting function straight length.
Definition: VarData.h:341
double pVelMax(int d)
Maximum velocity.
Definition: VarData.h:926
int EndIdx
End particle position.
Definition: VarData.h:267
int NType
of types of the particle
Definition: VarData.h:355
unsigned long Step
Courrent step.
Definition: VarData.h:343
double RePhob
End2End distance of the.
Definition: VarData.h:373
double CutOff
Cut off of the potential.
Definition: VarData.h:459
double pTemp()
Temperature.
Definition: VarData.h:912
Implementation of useful algorythms.
Definition: Matematica.h:76
int IfNormalize
If normalize the lateral dimensions to one.
Definition: VarData.h:1092
int CLat1
lateral coordinate
Definition: VarData.h:1076
Information of every particle.
Definition: VarData.h:214
Coefficient of a spline.
int NAllocC
Number of allocated chains.
Definition: VarData.h:353
Reads and elaborates a system of chains.
Definition: VarData.h:521
int NSoft
Number of soft bodies.
Definition: VarData.h:1062
void Print()
Print the current values.
Definition: VarData.h:369
int NPart
Number of particle.
Definition: VarData.h:345
PART * Pm
Particle information of all particle.
Definition: VarData.h:1046
int Typ
Type.
Definition: VarData.h:226
double ReOverCutOff
Convertion unit R_e over CutOff.
Definition: VarData.h:335
int NPCh
Number of particles per chain.
Definition: VarData.h:248
int NBlock
Number of blocks.
Definition: VarData.h:359
double pDeltat()
Delta t.
Definition: VarData.h:910
double SurfTens
Surface tension.
Definition: VarData.h:321
double rho
Density coexistence.
Definition: VarData.h:327
XYZ c
Centroid.
Definition: VarData.h:502
void SetEdge(double Val, int d)
Set Edge.
Definition: VarData.h:976
double pkappaN()
Incompressibility.
Definition: VarData.h:930
int CNorm
Normal coordinate.
Definition: VarData.h:1074
int NHeight
Number of monomers per side.
Definition: VarData.h:477
void SetkBen(double Val)
Bending coupling.
Definition: VarData.h:936
double kappaBend
Prefactor of the bending potential.
Definition: VarData.h:329