8 vfprintf(stderr, s, args);
16 Shout(
"Constructor/no starting configuration");
18 sprintf(ConfFile,
"%s",ConfFileExt);
20 sprintf(ConfF,ConfFile);
32 printf(
"using: nEdge[0] %d nEdge[1] %d\n",
nEdge[0],
nEdge[1]);
34 printf(
"Could not find the appropriate border partition %d %d\n",
nEdge[0],
nEdge[1]);
43 else if(VAR_IF_TYPE(
SysShape,SYS_3D)){
48 else if(VAR_IF_TYPE(
SysShape,SYS_ROD)){
53 else if(VAR_IF_TYPE(
SysShape,SYS_STALK)){
59 else if(VAR_IF_TYPE(
SysShape,SYS_LEAVES)){
65 else if(VAR_IF_TYPE(
SysShape,SYS_PORE)){
70 else if(VAR_IF_TYPE(
SysShape,SYS_1D)){
75 else if(VAR_IF_TYPE(
SysShape,SYS_RIGID)){
79 else if(VAR_IF_TYPE(
SysShape,SYS_TRIAL)){
84 else if(VAR_IF_TYPE(
SysShape,SYS_MD)){
89 else if(VAR_IF_TYPE(
SysShape,SYS_MC)){
94 else if(VAR_IF_TYPE(
SysShape,SYS_ELECTRO)){
129 if(VAR_IF_TYPE(
SysShape,SYS_ELECTRO)){
141 Shout(
"Freeing/md: forces domain decomposition");
142 if(VAR_IF_TYPE(
SysAlloc,ALL_FORCES)){
150 delete [] OldNrgBead;
152 for(
int p=0;p<
pNPCh();p++){
158 for(
int t=0;t<NTrialBias;t++){
159 delete [] BondPosBias[t];
161 delete [] BondPosBias;
162 delete [] CumProbBias;
164 if(VAR_IF_TYPE(
SysAlloc,ALL_SPLINE)){
179 if(VAR_IF_TYPE(
SysShape,SYS_LEAVES)){
187 Shout(
"constructor with intial configuration");
192 Open(Snapshot,BF_PART);
201 Shout(
"Preparing system");
209 Shout(
"Preparing system/adding densities\n");
212 if(VAR_IF_TYPE(
CalcMode,CALC_NcVT)){
218 if(VAR_IF_TYPE(
CalcMode,CALC_mcVT)){
219 if(!VAR_IF_TYPE(
CalcMode,CALC_CONF_BIAS))
225 int c = (int)(p/(
double)
pNPCh());
234 if(VAR_IF_TYPE(
SysShape,SYS_ELECTRO)){
235 for(
int p=0;p<
NEdge;p++){
242 for(
int p=NEdge;p<NEdge+
NSpline;p++){
248 if(p==NEdge+NSpline-1)
Ln[p].
NLink = 0;
253 Shout(
"Preparing system/calculating forces\n");
256 else if(VAR_IF_TYPE(
SysShape,SYS_ROD)){
259 else if(VAR_IF_TYPE(
SysShape,SYS_LEAVES)){
262 else if(VAR_IF_TYPE(
SysShape,SYS_2D)){
276 Weight.
a1 = 0./Inter;
278 Weight.
a3 = 0./(Inter*SQR(Inter));
279 Weight.
a4 =
Kf.
SLap/(SQR(Inter)*SQR(Inter));
283 CoeffMatrix->
Print();
284 for(
int r=0;r<
pNPart();r++){
285 if(
Pm[r].Typ != 0){ IntMatrix->
Set(r,r,1.);
continue;}
286 if(r >= 2) IntMatrix->
Set(r,r-2,CoeffMatrix->
Val(2,0));
287 if(r >= 1) IntMatrix->
Set(r,r-1,CoeffMatrix->
Val(2,1));
288 if(r <
pNPart()-1) IntMatrix->
Set(r,r+1,CoeffMatrix->
Val(2,3));
289 if(r <
pNPart()-2) IntMatrix->
Set(r,r+2,CoeffMatrix->
Val(2,4));
290 IntMatrix->
Set(r,r,CoeffMatrix->
Val(2,2));
296 else if(VAR_IF_TYPE(
SysShape,SYS_LEAVES)){
299 CoeffMatrix->
Print();
300 for(
int r=0;r<
pNPCh();r++){
301 if(
Pm[r].Typ != 0){ IntMatrix->
Set(r,r,1.);
continue;}
302 if(r >= 2) IntMatrix->
Set(r,r-2,CoeffMatrix->
Val(2,0));
303 if(r >= 1) IntMatrix->
Set(r,r-1,CoeffMatrix->
Val(2,1));
304 if(r <
pNPart()-1) IntMatrix->
Set(r,r+1,CoeffMatrix->
Val(2,3));
305 if(r <
pNPart()-2) IntMatrix->
Set(r,r+2,CoeffMatrix->
Val(2,4));
306 IntMatrix->
Set(r,r,CoeffMatrix->
Val(2,2));
312 else if(VAR_IF_TYPE(
SysShape,SYS_2D)){
315 CoeffMatrix->
Print();
316 for(
int p=0;p<
pNPart();p++){
318 IntMatrix->
Set(p,p,1.);
323 int pym2 =
Ln[pym1].
Link[0];
324 int pyp2 =
Ln[pyp1].
Link[1];
327 int pxm2 =
Ln[pxm1].
Link[2];
328 int pxp2 =
Ln[pxp1].
Link[3];
332 if(PeriodicImage[0]){
333 IntMatrix->
Set(p,pxm2,CoeffMatrix->
Val(2,0));
334 IntMatrix->
Set(p,pxm1,CoeffMatrix->
Val(2,1));
335 IntMatrix->
Set(p,pxp1,CoeffMatrix->
Val(2,3));
336 IntMatrix->
Set(p,pxp2,CoeffMatrix->
Val(2,4));
339 if(pxm2 == p-2*
nEdge[1])
340 IntMatrix->
Set(p,pxm2,CoeffMatrix->
Val(2,0));
341 if(pxm1 == p-
nEdge[1])
342 IntMatrix->
Set(p,pxm1,CoeffMatrix->
Val(2,1));
343 if(pxp1 == p+
nEdge[1])
344 IntMatrix->
Set(p,pxp1,CoeffMatrix->
Val(2,3));
345 if(pxp2 == p+2*
nEdge[1])
346 IntMatrix->
Set(p,pxp2,CoeffMatrix->
Val(2,4));
348 IntMatrix->
Add(p,p,CoeffMatrix->
Val(2,2));
349 if(PeriodicImage[1]){
350 IntMatrix->
Set(p,pym2,CoeffMatrix->
Val(2,0));
351 IntMatrix->
Set(p,pym1,CoeffMatrix->
Val(2,1));
352 IntMatrix->
Set(p,pyp1,CoeffMatrix->
Val(2,3));
353 IntMatrix->
Set(p,pyp2,CoeffMatrix->
Val(2,4));
357 IntMatrix->
Set(p,pym2,CoeffMatrix->
Val(2,0));
359 IntMatrix->
Set(p,pym1,CoeffMatrix->
Val(2,1));
361 IntMatrix->
Set(p,pyp1,CoeffMatrix->
Val(2,3));
363 IntMatrix->
Set(p,pyp2,CoeffMatrix->
Val(2,4));
374 Shout(
"Preparing parallelisation");
375 MPI_Init(&argc,&argv);
377 MPI_Comm_rank(MPI_COMM_WORLD, &Rank);
378 MPI_Comm_size(MPI_COMM_WORLD, &Size);
379 int Partition = (int)(argc/(
double)Size);
380 NFile[0] = Partition*Rank;
381 NFile[1] = Partition*(Rank+1);
382 if(Rank==Size-1)
NFile[1] += argc%Size;
388 StatFile1 = fopen(
"StatDyn1.dat",
"w");
389 StatFile2 = fopen(
"StatDyn2.dat",
"w");
399 Shout(
"Allocating/md: forces, domain decomposition");
407 Shout(
"Allocating/rod: forces");
411 else if(VAR_IF_TYPE(
SysShape,SYS_MC)){
412 Shout(
"Allocating/mc: domain decomposition old chain positions, old energies for particles and chains, first bead distribution, bias (cumulative probabilities and bead positions)");
418 OldNrgBead =
new double[3*
pNAllocP()];
420 printf(
"Could not allocate OldNrgPm \n");
424 OldNrgCh =
new double[3*
pNAllocC()];
425 FirstBeadDistr =
new double[NBin];
427 printf(
"Could not allocate OldNrgCh\n");
430 OldPos = (
double **)calloc(
pNPCh(),
sizeof(double));
432 printf(
"Could not allocate OldPos\n");
435 for(
int p=0;p<
pNPCh();p++){
436 OldPos[p] = (
double *)calloc(3,
sizeof(
double));
438 CumProbBias =
new double[NTrialBias];
439 BondPosBias =
new double*[NTrialBias];
440 for(
int t=0;t<NTrialBias;t++){
441 BondPosBias[t] =
new double[3];
448 else if(VAR_IF_TYPE(
SysShape,SYS_ELECTRO)){
449 Shout(
"Allocating/mc: domain decomposition old chain positions, old energies for particles and chains, first bead distribution, bias (cumulative probabilities and bead positions)");
455 OldNrgBead =
new double[3*
pNAllocP()];
457 printf(
"Could not allocate OldNrgPm \n");
461 OldNrgCh =
new double[3*
pNAllocC()];
462 FirstBeadDistr =
new double[NBin];
464 printf(
"Could not allocate OldNrgCh\n");
467 OldPos = (
double **)calloc(
pNPCh(),
sizeof(double));
469 printf(
"Could not allocate OldPos\n");
472 for(
int p=0;p<
pNPCh();p++){
473 OldPos[p] = (
double *)calloc(3,
sizeof(
double));
475 CumProbBias =
new double[NTrialBias];
476 BondPosBias =
new double*[NTrialBias];
477 for(
int t=0;t<NTrialBias;t++){
478 BondPosBias[t] =
new double[3];
484 Shout(
"Allocating/splines");
488 if(VAR_IF_TYPE(
CalcMode,CALC_DENS)){
489 Shout(
"Allocating/particle densities, sum of local densities");
490 LocDens2 = (
double *)calloc(
pNPCh()*
pNType(),
sizeof(double));
491 LocDens3 = (
double *)calloc(
pNPCh()*
pNType(),
sizeof(double));
494 if( !Dens2 || !Dens3){
495 printf(
"Could not allocate Dens2 Dens3\n");
506 Shout(
"Init constants");
534 BoundCond[0] = 1;BoundCond[1] = 1;
535 BoundCond[2] = 1;BoundCond[3] = 1;
536 BoundCond[4] = 1;BoundCond[5] = 1;
537 PeriodicImage[0] = 1;PeriodicImage[1] = 1;PeriodicImage[2] = 1;
565 printf(
"-----INFO-------\n");
572 printf(
"Energy: Sys %lf Ch Part \n",OldNrgSys);
577 else if(VAR_IF_TYPE(
SysShape,SYS_MD)){
578 for(
int p=0;p<
pNPart();p++){
580 printf(
"%d) (%lf,%lf,%lf) (%lf %lf %lf) %lf-%lf-%lf\n",p,
pPos(p,0),
pPos(p,1),
pPos(p,2),
pVel(p,0),
pVel(p,1),
pVel(p,2),
Fm[p].Dir[2],
Fm[p].Dir[2],
Fm[p].Dir[2]);
583 printf(
"------------\n");
589 FILE *FileToRead = fopen(InFile,
"r");
590 if(FileToRead == NULL){
591 printf(
"The conf file %s is missing\n",InFile);
596 char *Line = (
char *)malloc(256*
sizeof(
char));
599 for(
int k=0;!(fgets(Line,256,FileToRead)==NULL);k++){
600 if(strstr(Line,
"Rigid") == Line) NNano++;
605 for(
int k=0;!(fgets(Line,256,FileToRead)==NULL);k++){
607 if(1 == sscanf(Line,
"NEdge %lf",buff) )
609 else if(1 == sscanf(Line,
"SysShape %s",SysInit) ){
610 if(!strcmp(SysInit,
"leaves") )
612 else if(!strcmp(SysInit,
"pore") )
614 else if(!strcmp(SysInit,
"1d") )
616 else if(!strcmp(SysInit,
"2d") )
618 else if(!strcmp(SysInit,
"3d") )
620 else if(!strcmp(SysInit,
"rod") )
622 else if(!strcmp(SysInit,
"trial") )
624 else if(!strcmp(SysInit,
"rigid") )
626 else if(!strcmp(SysInit,
"stalk") )
628 else if(!strcmp(SysInit,
"md") )
630 else if(!strcmp(SysInit,
"mc") )
632 else if(!strcmp(SysInit,
"electro") ){
637 printf(
"system type not recognized\n");
641 else if(1 == sscanf(Line,
"CalcMode %s",SysInit) ){
642 if(!strcmp(SysInit,
"NVT") )
644 else if(!strcmp(SysInit,
"NcVT") )
646 else if(!strcmp(SysInit,
"mcVT") )
648 else if(!strcmp(SysInit,
"mVT") )
651 printf(
"calculation type not recognized\n");
655 else if(1 == sscanf(Line,
"Thermostat %s",SysInit) ){
656 if(!strcmp(SysInit,
"Langevin") )
658 else if(!strcmp(SysInit,
"Andersen") )
660 else if(!strcmp(SysInit,
"Berendsen") )
662 else if(!strcmp(SysInit,
"no") )
665 printf(
"thermostat not recognized\n");
669 else if(1 == sscanf(Line,
"PotentialMode %s",SysInit) ){
670 if(!strcmp(SysInit,
"Pair") )
672 else if(!strcmp(SysInit,
"DensFunc") )
674 else if(!strcmp(SysInit,
"DensFuncCh") )
677 else if(1 == sscanf(Line,
"Potential %s",SysInit) ){
678 if(!strcmp(SysInit,
"LJ") )
680 else if(!strcmp(SysInit,
"LJ39") )
682 else if(!strcmp(SysInit,
"Harmonic") )
684 else if(!strcmp(SysInit,
"Step") )
686 else if(!strcmp(SysInit,
"Electro") )
687 VAR_ADD_TYPE(
CalcMode,CALC_ELECTRO);
689 printf(
"interaction potential not recognized\n");
693 else if(1 == sscanf(Line,
"IfInterp %lf",buff) )
695 else if(1 == sscanf(Line,
"Lap %lf",buff) )
697 else if(1 == sscanf(Line,
"SLap %lf",buff) )
699 else if(1 == sscanf(Line,
"Ext %lf",buff) )
701 else if(1 == sscanf(Line,
"LJ %lf",buff) )
703 else if(1 == sscanf(Line,
"LJMin %lf",buff) )
705 else if(1 == sscanf(Line,
"kSpr %lf",buff) )
707 else if(1 == sscanf(Line,
"SprRest %lf",buff) )
709 else if(1 == sscanf(Line,
"kBen %lf",buff) )
711 else if(1 == sscanf(Line,
"SimLimit %lf",buff) )
713 else if(1 == sscanf(Line,
"CutOff %lf",buff) )
715 else if(1 == sscanf(Line,
"Cont %lf",buff) )
717 else if(1 == sscanf(Line,
"NWrite %lf",buff) )
719 else if(1 == sscanf(Line,
"NBin %lf",buff) )
721 else if(1 == sscanf(Line,
"NGrid %lf",buff) )
723 else if(1 == sscanf(Line,
"NUpdate %lf",buff) )
725 else if(strstr(Line,
"Rigid") == Line){
729 else if(1 == sscanf(Line,
"IfMovie %lf",buff) )
731 else if(1 == sscanf(Line,
"IfLine %lf",buff) )
733 else if(1 == sscanf(Line,
"NSpline %lf",buff) )
735 else if(1 == sscanf(Line,
"IfSphere %lf",buff) )
738 else if(3 == sscanf(Line,
"Edge %lf %lf %lf",buff,buff+1,buff+2) ){
743 else if(3 == sscanf(Line,
"El %lf %lf %lf",buff,buff+1,buff+2) ){
745 Kf.
El[1] = *(buff+1);
746 Kf.
El[2] = *(buff+2);
748 else if(3 == sscanf(Line,
"Elong %lf %lf %lf",buff,buff+1,buff+2) ){
753 else if(6 == sscanf(Line,
"Boundary %lf %lf %lf %lf %lf %lf",buff,buff+1,buff+2,buff+3,buff+4,buff+5)){
754 BoundCond[0] = (int)buff[0];
755 BoundCond[1] = (int)buff[1];
756 BoundCond[2] = (int)buff[2];
757 BoundCond[3] = (int)buff[3];
758 BoundCond[4] = (int)buff[4];
759 BoundCond[5] = (int)buff[5];
761 else if(3 == sscanf(Line,
"Periodic %lf %lf %lf",buff,buff+1,buff+2)){
762 PeriodicImage[0] = (int)*buff;
763 PeriodicImage[1] = (int)*(buff+1);
764 PeriodicImage[2] = (int)*(buff+2);
766 else if(1 == sscanf(Line,
"Deltat %lf",buff) )
768 else if(1 == sscanf(Line,
"Temp %lf",buff) )
770 else if(1 == sscanf(Line,
"NChemPotId %lf",buff) )
772 else if(1 == sscanf(Line,
"NTrialBias %lf",buff) ){
773 NTrialBias =(int) *buff;
775 else if(1 == sscanf(Line,
"ChemPotEx %lf",buff) )
777 else if(1 == sscanf(Line,
"IfConfBias %lf",buff) ){
779 VAR_ADD_TYPE(
CalcMode,CALC_CONF_BIAS);
781 else if(1 == sscanf(Line,
"IfBilBias %lf",buff) ){
783 VAR_ADD_TYPE(
CalcMode,CALC_BIL_BIAS);
787 else if(1 == sscanf(Line,
"IfSphBias %lf",buff) ){
789 VAR_ADD_TYPE(
CalcMode,CALC_SPH_BIAS);
791 else if(1 == sscanf(Line,
"Viscosity %lf",buff) )
793 else if(1 == sscanf(Line,
"TNSlab %lf",buff) )
795 else if(1 == sscanf(Line,
"TNComp %lf",buff) )
797 else if(1 == sscanf(Line,
"TCalcMode %s",SysInit) ){
798 if(!strcmp(SysInit,
"2d") ){
802 else if(!strcmp(SysInit,
"3d") ){
807 printf(
"Pressure summation not recognized\n");
815 printf(
"Forces] Lap %lf SLap %lf Ext %lf LJ %lf Cont %lf El %lf %lf %lf Elong %lf %lf %lf\n",
Kf.
Lap,
Kf.
SLap,
Kf.
Ext,
Kf.
LJ,
Kf.
Cont,
Kf.
El[0],
Kf.
El[1],
Kf.
El[2],
Kf.
Elong[0],
Kf.
Elong[1],
Kf.
Elong[2]);
826 double *Dens2T = (
double *)calloc(
pNPart()*
pNType(),
sizeof(double));
827 double *Dens3T = (
double *)calloc(
pNPart()*
pNType(),
sizeof(double));
828 for(
int p=0;p<OldNPart*
pNType();p++){
829 Dens2T[p] = Dens2[p];
830 Dens3T[p] = Dens3[p];
840 for(
int p=0;p<OldNPart*
pNType();p++){
841 Dens2[p] = Dens2T[p];
842 Dens3[p] = Dens3T[p];
846 double *TempNrgPart =
new double[OldNPart];
847 for(
int p=0;p<OldNPart;p++){
848 TempNrgPart[p] = OldNrgBead[p];
851 OldNrgBead =
new double[
pNAllocP()];
852 for(
int p=0;p<OldNPart;p++){
853 OldNrgBead[p] = TempNrgPart[p];
855 delete []TempNrgPart;
859 for(
int p=0;p<OldNPart;p++){
860 for(
int d=0;d<3;d++){
867 for(
int p=0;p<OldNPart;p++){
868 for(
int d=0;d<3;d++){
882 double *TempNrgCh =
new double[OldNChain];
883 for(
int c=0;c<3*OldNChain;c++){
884 TempNrgCh[c] = OldNrgCh[c];
888 for(
int c=0;c<3*OldNChain;c++){
889 OldNrgCh[c] = TempNrgCh[c];
void AddPart(const int p, double *Pos)
Add a particle to the cell c.
int SetNLink(int NewNCh)
Set and reallocate the number of links.
double NChemPotId
Equilibrium number of particles/chains.
void SetNPCh(int NewNCh)
Set and reallocate the number of particles per chains.
double a4
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
double LJMin
Lennard-Jones.
double Ext
External force.
int NLink
How many links per particle.
void ReSetNPCh(int NewNPCh)
Set a new number of particle per chain.
double Cont
Contact/Friction.
double pVel(int p, int d)
Return the velocity.
BLOCK * Block
Information for every block.
void Erase()
Erase the pairlist.
LINKS * Ln
Array of linking between the particles.
NANO * Nano
Extra particle.
void PrepareSys()
Calculate some initial quantities for the succesive calculations.
Energy contribution from the density functional hamiltonian.
int SetNChain(int NewNCh)
Set and reallocate the number of chains.
double Lap
Prefactor of the Laplacian.
void SetCoeff(double Co, int t1, int t2)
Set the prefactor.
int pNAllocC()
Allocated number of chains.
int Asym
Diblock limit of the chain.
int SetNBlock(int Val)
Set NBlock.
double Viscosity
Viscosity of the medium.
double pInvEdge(int d)
Inverted xyzr edges of the simulation box.
double GaussVar
Standard deviation of the gaussian chain.
double Height
Height of the cylinder.
double El[3]
Elastic force.
int IfInterp
If interpolates with the splines.
void FillMatrix()
Fill the entries of the interaction matrix.
double SumForcesMD()
Iterate all over the particles and calculate the forces.
int Frame
Current number of frame.
int NWrite
How many timesteps before write the snapshot.
double pkSpr()
Spring coupling.
Forces(int argc, char **argv, int NPart, char *ConfFile)
Create an initial system and choose the simulation thecnique.
~Forces()
Frees the memory.
int IfExit
Exit from the loop.
void SetBkf(int p)
Set the back folded array for the particle p.
bool Open(char *InFile, int BF)
Open the.
int NFile[2]
First and last file of the list.
int SysAlloc
Which arrays are allocated.
int IfFillMatrix
If the matrix has to be changed.
double pVol()
xyzr edges of the simulation box
void PrepareParallel(int argc, char **argv)
Create the grid for the parallelisation.
double ChemPotEx
Chemical potential of the particles.
void CreateInitial()
Create an initial configuration and an appropriate force field.
int SimLimit
Maximum number of time steps.
int CalcMode
Calculation mode.
void ChooseThermostat(int Mode)
Choose a calculation mode.
void Shout(const char *s,...)
Internal message.
int pNAllocP()
Allocated number of particles.
void SetDeltat(double Val)
Set DeltaT.
void Info()
System's info.
int SetNPart(int NewNPart)
Set and reallocate the number of particles.
double pEdge(int d)
xyzr edges of the simulation box
void Clear()
Set all the entries to zero.
int pNPCh()
Number of particle per chain.
int Idx
Particle identifier.
double a3
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
GLuint * Cylinder
List referring the cylinder.
double Dx
Spatial separation between particles.
int ReSetNPart(int NewNPart)
Realloc the number of particles.
void ReOpen(char *FName, int Bf)
Open a new file.
MatInt * MInt
Matrix of the prefactor of the interactions.
int * Link
with whom is bonded
int NEdge
Number of particles per edge.
double Val(int row)
Returns a value in 1d.
void InitConst()
Read the config file.
KFORCES Kf
Prefactor of the forces.
int NUpdate
How many timesteps before redrawing.
void SetkSpr(double Val)
Spring coupling.
double IncrDist
Step to move a particle.
void SetTemp(double Val)
Set Temperature.
void StudySys()
Obtain informations for a better performance in inserting the chains.
Basics class to start a MPI grid.
int SysShape
Shape of system.
int SysType
Contains the definition of the system.
bool Add(int row, int col, double Val)
Add the value of the coefficient to the previous one.
int pNNano()
Number of nanoparticles.
double DensFuncNrgSys()
Calculation of the energy from the density functional Hamiltonian for the system. ...
void AllocMethod()
Allocated the structures needed for the corresponding simulation method.
double a2
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
double a1
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
Single contribution of the forces.
int nEdge[3]
Number of particle per edge.
int NPCh
particles per chain
Matrice computes the algebric operations on matrices.
int CalcMode
Calculation mode.
bool Set(int row, int column, double Val)
Set a coefficient.
double ChemPotId
Chemical potential of the particles.
void SetStep(int Val)
Set Step.
int IfSphere
Visualize spheres or points.
int NanoString(char *cLine, int n)
Reads and set the specifics of the nano.
int ReSetNChain(int NewNChain)
Realloc the number of chains.
double pReOverCutOff()
Re/CutOff.
void SetNType(int NewNType)
Set the number of species.
int IfMovie
Produce the images for the video.
void SetSprRest(double Val)
Rest distance of the harmonic potential.
int pNType()
of types of the particle
double pPos(int p, int d)
Return back folded position.
int pNChain()
Number of chain.
int CLat1
lateral coordinate
Information of every particle.
double Elong[3]
Elongation of the springs.
double a0
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
double CutOff2
CutOff of the lennard jones.
int ReadConfDinamica(char *File)
Read the config file.
int SetNNano(int Val)
Set NNano.
Domain decomposition as pointer to linked particles.
PART * Pm
Particle information of all particle.
void Print()
Print the entries.
int ThermMode
Thermostat mode.
TENS Tens
Structure for the pressure calculation.
double NrgPBead
Average energy per particle.
double SLap
Prefactor of the square laplacian.
void SetEdge(double Val, int d)
Set Edge.
void DefNanoForceParam()
Define the parameters for calculating the force.
double ForThr
Maximum force allowed.
int Bead2Move
Bead to move.
FORCES * Fm
Array containing the forces for each particle.
int pNPart()
Number of particle.
int NSpline
Total number of points for drawing a spline.
void SetkBen(double Val)
Bending coupling.