Allink  v0.1
ForcesCreate.cpp
1 #include "Forces.h"
3  if(VAR_IF_TYPE(SysShape,SYS_1D)){
4  Create1d();
5  }
6  else if(VAR_IF_TYPE(SysShape,SYS_2D)){
7  Create2d();
8  }
9  else if(VAR_IF_TYPE(SysShape,SYS_3D)){
10  Create3d();
11  }
12  else if(VAR_IF_TYPE(SysShape,SYS_STALK)){
13  CreateStalk();
14  }
15  else if(VAR_IF_TYPE(SysShape,SYS_LEAVES)){
16  CreateLeaves();
17  }
18  else if(VAR_IF_TYPE(SysShape,SYS_PORE)){
19  CreatePore();
20  }
21  else if(VAR_IF_TYPE(SysShape,SYS_ROD)){
22  CreateRod();
23  }
24  else if(VAR_IF_TYPE(SysShape,SYS_RIGID)){
25  CreateRigid();
26  }
27  else if(VAR_IF_TYPE(SysShape,SYS_MD)){
28  CreateMD();
29  }
30  else if(VAR_IF_TYPE(SysShape,SYS_MC)){
31  CreateMC();
32  }
33  else if(VAR_IF_TYPE(SysShape,SYS_ELECTRO)){
34  CreateElectro();
35  }
36  else if(VAR_IF_TYPE(SysShape,SYS_TRIAL)){
37  int NSect = 3;
38  double Pos[3];
39  for(int d=0;d<3;d++){
40  Pos[d] = .5*pEdge(d)/(double)NSect;
41  }
42  for(int p=0;p<pNPart();p++){
43  for(int d=0;d<3;d++){
44  Pm[p].Pos[d] = Pos[d];
45  }
46  Pm[p].Typ = 0;
47  Pos[0] += pEdge(0)/(double)NSect;
48  if(Pos[0] > pEdge(0)){
49  Pos[0] = .5*pEdge(0)/(double)NSect;
50  Pos[1] += pEdge(1)/(double)NSect;
51  if(Pos[1] > pEdge(1)){
52  Pos[1] = .5*pEdge(1)/(double)NSect;
53  Pos[2] += pEdge(2)/(double)NSect;
54  }
55  }
56  }
57  // Pm[0].Pos[0] = .1;Pm[0].Pos[1] = .5;Pm[0].Pos[2]= .5;
58  // Pm[1].Pos[0] = .2;Pm[1].Pos[1] = .6;Pm[1].Pos[2]= .7;
59  // Pm[2].Pos[0] = .3;Pm[2].Pos[1] = .9;Pm[2].Pos[2]= .2;
60  // Pm[3].Pos[0] = .4;Pm[3].Pos[1] = .3;Pm[3].Pos[2]= .5;
61  // Pm[4].Pos[0] = .5;Pm[4].Pos[1] = .4;Pm[4].Pos[2]= .6;
62  }
63  else{
64  printf("System shape not recognized %d\n",SysShape);
65  return ;
66  }
68  VAR_ADD_TYPE(SysType,VAR_SYS_TXVL);
69  VAR_ADD_TYPE(SysType,VAR_EDGE);
70 }
72  double Dx = pEdge(0)/(double)(nEdge[0]);
73  double Dy = pEdge(1)/(double)(nEdge[1]);
74  for(int px=0;px<nEdge[0];px++){
75  for(int py=0;py<nEdge[1];py++){
76  int p = px*nEdge[1]+py;
77  Pm[p].Idx = p;
78  Pm[p].Pos[0] = Dx*(double)px + .5*Dx;
79  Pm[p].Pos[1] = Dy*(double)py + .5*Dy;
80  Pm[p].Pos[2] = 0.;
81  Pm[p].CId = py;
82  Pm[p].Typ = 0;
83  if(px == 0 && BoundCond[0]){
84  Pm[p].Typ = 2;
85  }
86  if(px == nEdge[0]-1 && BoundCond[1]){
87  Pm[p].Typ = 2;
88  }
89  if(py == 0 && BoundCond[2]){
90  Pm[p].Typ = 2;
91  }
92  if(py == nEdge[1]-1 && BoundCond[3]){
93  Pm[p].Typ = 2;
94  }
95  Ln[p].NLink = 4;
96  int pym1 = p-1;
97  if( py-1 < 0 ) pym1 += nEdge[1];
98  if(pym1 >= pNPart() ) pym1 -= pNPart();
99  Ln[p].Link[0] = pym1;
100  int pyp1 = p+1;
101  if( py+1 >= nEdge[1]) pyp1 -= nEdge[1];
102  if(pyp1 < 0) pyp1 += pNPart();
103  Ln[p].Link[1] = pyp1;
104  int pxm1 = p-nEdge[1];
105  if(pxm1 < 0) pxm1 += pNPart();
106  Ln[p].Link[2] = pxm1;
107  int pxp1 = p+nEdge[1];
108  if(pxp1 > pNPart()-1) pxp1 -= pNPart();
109  Ln[p].Link[3] = pxp1;
110  //printf("%d) %d %d %d %d \n",p,Ln[p].Link[0],Ln[p].Link[1],Ln[p].Link[2],Ln[p].Link[3]);
111  }
112  }
113  //Ln[0].Link[0] = nEdge[0]-1;
114  AddRigid();
115 }
117  double Dx = pEdge(0)/(double)(NEdge-1);
118  double Dy = pEdge(1)/(double)(NEdge-1);
119  double Dz = pEdge(2)/(double)(NEdge-1);
120  Kf.Elong[1] = Dx;
121  Kf.Elong[2] = Dy;
122  Kf.Elong[0] = Dz;
123  Kf.El[0] = 11.;//Elastic coupling
124  Kf.El[1] = 11.;//Elastic coupling
125  Kf.El[2] = 11.;//Elastic coupling
126  for(int px=0,ppp=0;px<NEdge;px++){
127  for(int py=0;py<NEdge;py++){
128  for(int pz=0;pz<NEdge;pz++){
129  Pm[ppp].Idx = ppp;
130  Pm[ppp].Pos[0] = Dx*(double)px;
131  Pm[ppp].Pos[1] = Dy*(double)py;//Mate->Casuale();//Dy*(double)p;
132  Pm[ppp].Pos[2] = Dz*(double)pz;//Mate->Casuale();
133  // if( p == 20)
134  // Pm[p].Pos[2] = .01;
135  int link = 0;
136  if(pz != NEdge-1){
137  Ln[ppp].Link[link] = ppp+1;
138  link++;
139  }
140  if(pz != 0){
141  Ln[ppp].Link[link] = ppp-1;
142  link++;
143  }
144  if(py != 0){
145  Ln[ppp].Link[link] = ppp-NEdge;
146  link++;
147  }
148  if(py != NEdge-1){
149  Ln[ppp].Link[link] = ppp+NEdge;
150  link++;
151  }
152  if(px != 0){
153  Ln[ppp].Link[link] = ppp-NEdge*NEdge;
154  link++;
155  }
156  if(px != NEdge-1){
157  Ln[ppp].Link[link] = ppp+NEdge*NEdge;
158  link++;
159  }
160  Ln[ppp].NLink = link;
161  if( (px == 0 || px == NEdge -1) &&
162  (py == 0 || py == NEdge -1) &&
163  (pz == 0 || pz == NEdge -1))
164  Pm[ppp].Typ = 2;
165  //for(int l=0;l<Ln[ppp].NLink;l++)
166  //printf("%d %d %lf %lf %lf\n",ppp,Pm[ppp].Link[l],Pm[ppp].Pos[0] - Pm[Pm[ppp].Link[l]].Pos[0],Pm[ppp].Pos[1] - Pm[Pm[ppp].Link[l]].Pos[1],Pm[ppp].Pos[2] - Pm[Pm[ppp].Link[l]].Pos[2]);
167  ppp++;
168  }
169  }
170  }
171 }
173  double Dx = pEdge(0)/(double)(NEdge-1);
174  double Dy = pEdge(1)/(double)(NEdge-1);
175  double Dz = pEdge(2)/(double)(NEdge-1);
176  Bead2Move = 0;
177  for(int p=0;p<NEdge;p++){
178  Kf.Elong[0] = Dx;
179  Pm[p].Idx = p;
180  Pm[p].Pos[0] = Dx*p;
181  Pm[p].Pos[1] = .5*pEdge(1);
182  Pm[p].Pos[2] = Kf.Elong[2];
183  Pm[p].CId = 0;
184  Pm[p].Typ = 0;
185  if(p == Bead2Move) Pm[p].Typ = 1;
186  Ln[p].NLink = 2;
187  if(p == 0){
188  if(BoundCond[0])
189  Ln[p].Link[0] = NEdge-1;
190  else
191  Ln[p].NLink = 1;
192  Pm[p].Typ = 2;
193  }
194  else
195  Ln[p].Link[0] = p-1;
196  if(p == NEdge-1){
197  if(BoundCond[1])
198  Ln[p].Link[1] = 0;
199  else
200  Ln[p].NLink = 1;
201  Pm[p].Typ = 2;
202  }
203  else
204  Ln[p].Link[1] = p+1;
205  }
206  AddRigid();
207 }
209  double Dx = pEdge(0)/(double)(NEdge-1);
210  double Dy = pEdge(1)/(double)(NEdge-1);
211  double Dz = pEdge(2)/(double)(NEdge-1);
212  for(int p=0;p<NEdge;p++){
213  Pm[p].Idx = p;
214  Pm[p].Pos[0] = p*Dx*.5;
215  Pm[p].Pos[1] = .5*pEdge(1);
216  Pm[p].Pos[2] = .5*pEdge(2);
217  Pm[p].CId = 0;
218  Pm[p].Typ = 0;
219  if(p < NEdge-1){
220  Ln[p].NLink = 1;
221  Ln[p].Link[0] = p+1;
222  }
223  }
224  for(int p=0;p<2;p++){
225  Pm[p].Typ = 2;
226  }
227  //SetkSpr(0.);
228  SetkBen(Kf.SLap);
229  Bead2Move = NEdge - 1;
230  Pm[Bead2Move].Typ = 1;
231  Pm[Bead2Move-1].Typ = 1;
232 }
234  double Dx = pEdge(0)/(double)(NEdge-1);
235  double Dy = pEdge(1)/(double)(NEdge-1);
236  double Dz = pEdge(2)/(double)(NEdge-1);
237  Kf.Elong[0] = Dx;
238  Bead2Move = 0;
239  int NSegment = (int)(NEdge/6.);
240  double AngleS = .25*DUE_PI/(double)NSegment;
241  for(int c=0;c<pNChain();c++){
242  for(int p=c*NEdge;p<NEdge*(c+1);p++){
243  Pm[p].Pos[0] = Dx*(double)(p-c*NEdge);
244  Pm[p].Pos[1] = .5*pEdge(1);
245  Pm[p].Pos[2] = Kf.Elong[2]*(c-.5)+.5*pEdge(2);
246  if(p >= c*NEdge + 2*NSegment && p <= c*NEdge + 4*NSegment){
247  //double pa = (double)(p-c*NEdge + 4*NSegment);
248  double pa = (double)(p-2*NSegment);
249  double x = Kf.Elong[2]*.5*sin(AngleS*pa);
250  double z = Kf.Elong[2]*.5*cos(AngleS*pa);
251  Pm[p].Pos[0] = x + Dx*2*NSegment;
252  Pm[p].Pos[2] = -z + Kf.Elong[2]*(c)+.5*pEdge(2);
253  }
254  else if(p > c*NEdge + 4*NSegment){
255  Pm[p].Pos[0] = Dx*(6*NSegment - p);
256  Pm[p].Pos[2] = Kf.Elong[2]*(c+.5)+.5*pEdge(2);
257  }
258  Pm[p].Idx = p;
259  Pm[p].CId = c;
260  Pm[p].Typ = 0;
261  if(p == Bead2Move) Pm[p].Typ = 1;
262  Ln[p].NLink = 3;
263  if(p == c*NEdge ){
264  Ln[p].Link[0] = p + 1;
265  }
266  else
267  Ln[p].Link[0] = p - 1;
268  if(p == NEdge*(c+1) - 1){
269  Ln[p].Link[1] = p - 1;
270  }
271  else
272  Ln[p].Link[1] = p + 1;
273  Ln[p].Link[2] = NEdge - p - 1;
274  }
275  }
276  int pHalf = (int)(NEdge/2.);
277  Ln[pHalf].NLink = 2;
278  Pm[0].Typ = 2;
279  Pm[1].Typ = 2;
280  Pm[NEdge-2].Typ = 2;
281  Pm[NEdge-1].Typ = 2;
282  Pm[pHalf-1].Typ = 2;
283  Pm[pHalf].Typ = 2;
284  Pm[pHalf+1].Typ = 2;
285  AddRigid();
286  // for(int p=0;p<pNPart();p++)
287  // printf("%d) %lf %lf %lf %d) %d %d %d\n",p,Pm[p].Pos[0],Pm[p].Pos[1],Pm[p].Pos[2],Ln[p].NLink,Ln[p].Link[0],Ln[p].Link[1],Ln[p].Link[2]);
288 }
290  double Dx = pEdge(0)/(double)(NEdge-1);
291  double Dy = pEdge(1)/(double)(NEdge-1);
292  double Dz = pEdge(2)/(double)(NEdge-1);
293  Bead2Move = 0;
294  int c=0;
295  int NSegment = (int)(NEdge/3.);
296  double AngleS = .5*DUE_PI/(double)NSegment;
297  for(int c=0;c<pNChain();c++){
298  for(int p=c*NEdge;p<NEdge*(c+1);p++){
299  Kf.Elong[0] = Dx;
300  Pm[p].Idx = p;
301  Pm[p].Pos[0] = Dx*(double)(p-c*NEdge);
302  Pm[p].Pos[1] = .5*pEdge(1);
303  Pm[p].Pos[2] = Kf.Elong[2]*(double)c+.5*pEdge(2)-1.5*Kf.Elong[2];
304  Pm[p].CId = c;
305  Pm[p].Typ = 0;
306  if(c==1){
307  if(p > c*NEdge + NSegment && p <= c*NEdge + 2*NSegment ){
308  double x = Kf.Elong[2]*.5*sin(AngleS*(p-c*NEdge + NSegment));
309  double z = Kf.Elong[2]*.5*cos(AngleS*(p-c*NEdge + NSegment));
310  Pm[p].Pos[0] = x + Dx*NSegment;
311  Pm[p].Pos[2] = z + Kf.Elong[2]*(double)c+.5-1.*Kf.Elong[2];//+ Kf.Elong[2]/(double)NSegment;
312  }
313  else if(p > c*NEdge + 2*NSegment ){
314  Pm[p].Pos[0] = Dx*(NEdge*(c+1)-p);
315  Pm[p].Pos[2] = Kf.Elong[2]*(double)(c+1)+.5-1.5*Kf.Elong[2];
316  }
317  }
318  if(c==2){
319  if(p < c*NEdge + NSegment ){
320  Pm[p].Pos[0] = 1. - Dx*(double)(p-c*NEdge);
321  Pm[p].Pos[2] = Kf.Elong[2]*(double)(c-1)+.5-1.5*Kf.Elong[2];
322  }
323  else if(p >= c*NEdge + NSegment && p < c*NEdge + 2*NSegment ){
324  double x = Kf.Elong[2]*.5*sin(AngleS*(p-c*NEdge + NSegment));
325  double z = Kf.Elong[2]*.5*cos(AngleS*(p-c*NEdge + NSegment));
326  Pm[p].Pos[0] = - x + 2*Dx*NSegment;
327  Pm[p].Pos[2] = z + Kf.Elong[2]*(double)(c-1)+.5-1.*Kf.Elong[2]; }
328  }
329  if(p == Bead2Move) Pm[p].Typ = 1;
330  Ln[p].NLink = 3;
331  if(p == c*NEdge ){
332  Ln[p].Link[0] = p + 1;
333  Pm[p].Typ = 2;
334  }
335  else
336  Ln[p].Link[0] = p - 1;
337  if(p == NEdge*(c+1) - 1){
338  Ln[p].Link[1] = p - 1;
339  Pm[p].Typ = 2;
340  }
341  else
342  Ln[p].Link[1] = p + 1;
343  if(c == 0)
344  Ln[p].Link[2] = p + NEdge;
345  if(c == 1)
346  Ln[p].Link[2] = p - NEdge;
347  if(p == c*NEdge + 1 || p == (c+1)*NEdge - 2)
348  Pm[p].Typ =2;
349  // if(p == c*NEdge + 2 || p == (c+1)*NEdge - 3)
350  //Pm[p].Typ =2;
351  }
352  }
353 }
355  double Dx = pEdge(0)/(double)(NEdge-1);
356  double Dy = pEdge(1)/(double)(NEdge-1);
357  double Dz = pEdge(2)/(double)(NEdge-1);
358  Bead2Move = NEdge/2;
359  for(int p=0;p<pNPart();p++){
360  Pm[p].Idx = p;
361  Pm[p].Pos[0] = Dx*(double)p;
362  Pm[p].Pos[1] = .5;//Mate->Casuale();//Dy*(double)p;
363  Pm[p].Pos[2] = .45;//Mate->Casuale();
364  Ln[p].NLink = 2;
365  Pm[p].Typ = 0;
366  if(p == Bead2Move) Pm[p].Typ = 1;
367  int link=0;
368  if(p == 0 || p==1){
369  Ln[p].NLink--;
370  Pm[p].Typ = 2;
371  }
372  else{
373  Ln[p].Link[link] = p - 1;
374  link++;
375  }
376  if(p == pNPart()-1 || p == pNPart()-2){
377  Ln[p].NLink--;
378  Pm[p].Typ = 2;
379  }
380  else{
381  Ln[p].Link[link] = p + 1;
382  link++;
383  }
384  }
385 }
387  SetNNano(2);
388  for(int n=0;n<pNNano();n++){
389  for(int d=0;d<3;d++){
390  Nano[n].Pos[d] = .5*pEdge(d);
391  Nano[n].Vel[d] = .0;
392  Nano[n].AVel[d] = 0.;
393  Nano[n].Axis[d] = 0.;
394  }
395  Nano[n].Axis[0] = 1.;
396  Nano[n].Shape = 2;
397  Nano[n].Rad = .03;
398  Nano[n].Height = .3;
399  Nano[n].Mass = 1.;
400  Nano[n].Gamma = 10.;
401  Nano[n].Zeta = 30.;
402  }
403  Nano[0].Mass = 1.;
404  Nano[1].Shape = 1;
405  for(int d=0;d<3;d++){
406  Nano[1].Pos[d] = .0*pEdge(d);
407  Nano[1].Vel[d] = .01;
408  }
409 }
411  int NSect[3] = {3,3,3};
412  StatFile1 = fopen("StatisticsMC1.dat","w");
413  StatFile2 = fopen("StatisticsMC2.dat","w");
414  NInsertion = 0;
415  NRemoval = 0;
417  PrintForce();
418  SetNChain(NEdge);
419  SetNPCh(1);
420  OldNrgBead = new double[pNPart()];
421  OldNrgCh = new double[pNChain()];
422  double Edge[3] = {pEdge(0),pEdge(1),pEdge(2)};
423  for(int d=0;d<3;d++) NSect[d] = (int)(Edge[d]/(double)(2.*sqrt(Kf.CutOff2)));
424  double Dens = pNPart()/pVol();
425  double Lambda3 = 1.;//CUBE(sqrt(DUE_PI/SQR(hPlanck)));
426  GaussVar = sqrt(SQR(pReOverCutOff())/(double)(Block[0].NPCh-1.)/3.)/2.;
427  for(int p=0;p<pNPart();p++){
428  for(int d=0;d<3;d++){
429  Pm[p].Pos[d] = Mat->Casuale()*pEdge(d);
430  }
431  }
432  ChooseCalcMode(CalcMode);
433  ChoosePot(CalcMode);
434 }
436  int NSect[3] = {3,3,3};
437  double Edge[3] = {pEdge(0),pEdge(1),pEdge(2)};
438  double Dens = pNPart()/pVol();
439  double Lambda3 = 1.;//CUBE(sqrt(DUE_PI/SQR(hPlanck)));
440  for(int d=0;d<3;d++)NSect[d] = (int)(Edge[d]/(double)(2.*sqrt(Kf.CutOff2)));
441  GaussVar = sqrt(SQR(pReOverCutOff())/(double)(Block[0].NPCh-1.)/3.)/2.;
443  int n3 = 2;
444  while ((n3*n3*n3)<pNPart()) n3++;
445  int iix=0;
446  int iiy=0;
447  int iiz=0;
448  for(int p=0;p<pNPart();p++){
449  Pm[p].Pos[0] = ((double)iix+0.5)*pEdge(0)/n3;
450  Pm[p].Pos[1] = ((double)iiy+0.5)*pEdge(1)/n3;
451  Pm[p].Pos[2] = ((double)iiz+0.5)*pEdge(2)/n3;
452  iix++;
453  if (iix==n3) {
454  iix=0;
455  iiy++;
456  if (iiy==n3) {
457  iiy=0;
458  iiz++;
459  }
460  }
461  for(int d=0;d<3;d++){
462  Pm[p].Vel[d] = Mat->Gaussiano(0.,1.0);
463  }
464  }
465  ChooseCalcMode(CalcMode);
466  ChoosePot(CalcMode);
467 }
469  int NSect[3] = {3,3,3};
470  StatFile1 = fopen("StatisticsMC1.dat","w");
471  StatFile2 = fopen("StatisticsMC2.dat","w");
472  NInsertion = 0;
473  NRemoval = 0;
475  PrintForce();
476  SetNChain(NEdge);
477  SetNPCh(1);
478  OldNrgBead = new double[pNPart()];
479  OldNrgCh = new double[pNChain()];
480  double Edge[3] = {pEdge(0),pEdge(1),pEdge(2)};
481  for(int d=0;d<3;d++) NSect[d] = (int)(Edge[d]/(double)(2.*sqrt(Kf.CutOff2)));
482  double Dens = pNPart()/pVol();
483  double Lambda3 = 1.;//CUBE(sqrt(DUE_PI/SQR(hPlanck)));
484  GaussVar = sqrt(SQR(pReOverCutOff())/(double)(Block[0].NPCh-1.)/3.)/2.;
485  int NCenter = 6;
486  double *PCenter = (double *)calloc(NCenter*2,sizeof(double));
487  GaussVar = Kf.Elong[0];
488  for(int c=0;c<NCenter;c++){
489  for(int d=0;d<2;d++){
490  PCenter[c*2+d] = Mat->Casuale()*pEdge(d)*.7 + pEdge(d)*.2;
491  }
492  }
493  for(int p=0;p<NEdge;p++){
494  int c = (p%NCenter);
495  for(int d=0;d<2;d++){
496  Pm[p].Pos[d] = Mat->Gaussiano(PCenter[c*2+d],GaussVar);
497  Pm[p].Pos[d] -= floor(Pm[p].Pos[d]*pInvEdge(d))*pEdge(d);
498  // if(Pm[p].Pos[d] > pEdge(d)) Pm[p].Pos[d] += pEdge(d) - Pm[p].Pos[d];
499  // if(Pm[p].Pos[d] < 0) Pm[p].Pos[d] *= -1.;
500  }
501  Pm[p].Pos[2] = .2*pEdge(2)*sin(6*Pm[p].Pos[0]*pInvEdge(0))*sin(4*Pm[p].Pos[1]*pInvEdge(1)) + .5*pEdge(2);
502  }
503  GaussVar = Kf.Elong[1];
504  for(int p=NEdge;p<NEdge+NSpline;p++){
505  for(int d=0;d<2;d++){
506  Pm[p].Pos[d] = (p-NEdge)/(double)NSpline*pEdge(d);
507  // double Move = Mat->Gaussiano(Pm[p-1].Pos[d],GaussVar);
508  // if(p == NEdge){ Pm[p].Pos[d] = 0.; Move = 0.;}
509  // if(Move > pEdge(d) ) Pm[p].Pos[d] = Move - pEdge(d);
510  // else if(Move < 0. ) Pm[p].Pos[d] = -Move;
511  // else Pm[p].Pos[d] = Move;
512  // Pm[p].Pos[d] -= floor(Pm[p].Pos[d]*pInvEdge(d))*pEdge(d);
513  }
514  Pm[p].Pos[2] = .2*pEdge(2)*sin(6*Pm[p].Pos[0]*pInvEdge(0))*sin(4*Pm[p].Pos[1]*pInvEdge(1)) + .5*pEdge(2);
515  }
516  ChooseCalcMode(CalcMode);
517  ChoosePot(CalcMode);
518 }
void SetNPCh(int NewNCh)
Set and reallocate the number of particles per chains.
int CId
Chain Identifier.
Definition: VarData.h:224
void CreateRod()
Create a initial disposition of particle for a stiff rod.
int NInsertion
Count accepted moves.
Definition: Forces.h:767
void Create2d()
Create a plane of connected beads.
BLOCK * Block
Information for every block.
Definition: VarData.h:1054
double Vel[4]
xyzr Velocity of the particle
Definition: VarData.h:220
LINKS * Ln
Array of linking between the particles.
Definition: VarData.h:1048
void AddRigid()
Add all rigid bodies as a boundary condition.
NANO * Nano
Extra particle.
Definition: VarData.h:1044
int SetNChain(int NewNCh)
Set and reallocate the number of chains.
Definition: VarDataComm.cpp:78
double Gamma
Friction term.
Definition: VarData.h:451
void CreateMC()
Create a initial disposition of particle for the MC sim.
double Mass
Mass.
Definition: VarData.h:443
double Rad
Size.
Definition: VarData.h:445
double pInvEdge(int d)
Inverted xyzr edges of the simulation box.
Definition: VarData.h:920
double GaussVar
Standard deviation of the gaussian chain.
Definition: Forces.h:725
double Height
Height of the cylinder.
Definition: VarData.h:449
double Vel[3]
Velocity.
Definition: VarData.h:431
double El[3]
Elastic force.
Definition: Forces.h:151
double Pos[3]
xyz Position of the particle
Definition: VarData.h:216
void CreateRigid()
Create rigid bodies.
void CreatePore()
Create the 1d representation of a pore.
int NRemoval
Count accepted moves.
Definition: Forces.h:769
double pVol()
xyzr edges of the simulation box
Definition: VarData.h:922
void CreateInitial()
Create an initial configuration and an appropriate force field.
Definition: ForcesCreate.cpp:2
int CalcMode
Calculation mode.
Definition: Forces.h:747
double Pos[3]
Position.
Definition: VarData.h:427
int Shape
0 none, 1 spherical, 2 cylindrical 3 wall
Definition: VarData.h:473
void Create1d()
Create single line of connected monomers.
double pEdge(int d)
xyzr edges of the simulation box
Definition: VarData.h:918
int Idx
Particle identifier.
Definition: VarData.h:222
double Dx
Spatial separation between particles.
Definition: Forces.h:729
int NEdge
Number of particles per edge.
Definition: VarData.h:1084
double Casuale()
Random uniform number.
KFORCES Kf
Prefactor of the forces.
Definition: Forces.h:779
double Zeta
Stochastic term.
Definition: VarData.h:453
void CreateElectro()
Create a initial disposition of houses to collect on a line.
int Old2Move
Old part to move.
Definition: Forces.h:739
int SysShape
Shape of system.
Definition: Forces.h:745
int SysType
Contains the definition of the system.
Definition: VarData.h:1086
void PrintForce()
Print the force and the potential.
int pNNano()
Number of nanoparticles.
int nEdge[3]
Number of particle per edge.
Definition: Forces.h:743
void CreateStalk()
Create the 1d representation of a stalk.
double Gaussiano(double Media, double Scarto)
Gaussian random number.
void CreateMD()
Create a initial disposition of particle for the MD sim.
double pReOverCutOff()
Re/CutOff.
Definition: VarData.h:946
Matematica * Mat
Implementation of all usefull algorythms.
Definition: VarData.h:527
void Create3d()
Create a lattice of connected beads.
int pNChain()
Number of chain.
double Elong[3]
Elongation of the springs.
Definition: Forces.h:159
double CutOff2
CutOff of the lennard jones.
Definition: Forces.h:165
double AVel[3]
Angular velocity.
Definition: VarData.h:441
double Axis[3]
Rotation axis.
Definition: VarData.h:435
int SetNNano(int Val)
Set NNano.
PART * Pm
Particle information of all particle.
Definition: VarData.h:1046
int Typ
Type.
Definition: VarData.h:226
void CreateLeaves()
Create two connected sheets and add a protein.
double SLap
Prefactor of the square laplacian.
Definition: Forces.h:149
void DefNanoForceParam()
Define the parameters for calculating the force.
int Bead2Move
Bead to move.
Definition: Forces.h:737
int pNPart()
Number of particle.
int NSpline
Total number of points for drawing a spline.
Definition: Forces.h:777
void SetkBen(double Val)
Bending coupling.
Definition: VarData.h:936