Allink
v0.1
|
This class performs the different steps to solve the equations of motion via molecular dynamics simulation, simple grancanonical simulation in Monte Carlo and solution of 1d differential equations. More...
#include <Forces.h>
Public Types | |
typedef void(Forces::* | CALC_THERM) () |
Pointer type to the potential function. | |
typedef double(Forces::* | TENS_REF) (double *Pos1, double *Pos2, double *PosP1, double *PosP2) |
Data type for distance/field functions. | |
Public Types inherited from VarData | |
typedef double(VarData::* | NANO_DIST) (double *Pos, int n) |
Data type for distance/field functions. | |
Public Member Functions | |
Forces (int argc, char **argv, int NPart, char *ConfFile) | |
Create an initial system and choose the simulation thecnique. | |
Forces (int argc, char **argv, char *ConfFileExt, char *Snapshot) | |
Read an initial system and choose the simulation thecnique. | |
void | Shout (const char *s,...) |
Internal message. | |
void | AllocMethod () |
Allocated the structures needed for the corresponding simulation method. | |
void | PrepareSys () |
Calculate some initial quantities for the succesive calculations. | |
void | PrepareParallel (int argc, char **argv) |
Create the grid for the parallelisation. | |
~Forces () | |
Frees the memory. | |
void | Info () |
System's info. | |
int | ReadConfDinamica (char *File) |
Read the config file. | |
void | InitConst () |
Read the config file. | |
int | ReSetNPart (int NewNPart) |
Realloc the number of particles. | |
int | ReSetNChain (int NewNChain) |
Realloc the number of chains. | |
void | ReSetNPCh (int NewNPCh) |
Set a new number of particle per chain. | |
void | ReOpen (char *FName, int Bf) |
Open a new file. | |
void | FillMatrix () |
Fill the entries of the interaction matrix. | |
void | StudySys () |
Obtain informations for a better performance in inserting the chains. More... | |
int | MinHelfrich () |
Minimum of the Helfrich Hamiltonian. | |
int | DynIntegration () |
Boh. | |
void | Dynamics () |
Sum up all the forces and update the positions. | |
void | Solve () |
Solve a system of four oder differential equation. More... | |
void | SolveLinks () |
Solve a system of four oder differential equation of particles connected by links. More... | |
void | SolveLinksSparse () |
Solve a system of four oder differential equation of particles connected by links. | |
void | SolveLinksIterative () |
Solve a system of four oder differential equation of particles connected by links. More... | |
void | SolveRod () |
Solve a system of four oder differential equation of particles connected by links. More... | |
void | SolveLeaves () |
Solve a system of four oder differential equation of particles in a line. More... | |
int | Update () |
Boh. | |
void | VelVerletRigid () |
Velocity Verlet for a rigid body, first step. More... | |
void | VelVerletRigid2 () |
Velocity Verlet for a rigid body, second step. More... | |
int | IfMetropolis (double ExpArg, double Weight) |
Metropolis acceptance criterium. More... | |
int | InsertBead (int p) |
Insert a particle in the box. More... | |
void | IgnoreCh (int c) |
Ignore a chain in the system (densities, pairlist) More... | |
void | RemChFromSys (int c) |
Delete a chain in the system. More... | |
void | SaveCh (int c) |
Save the chain configuration. More... | |
void | ReInsertCh (int c) |
Reinsert the chain in the previous position. More... | |
void | ConsiderCh (int c) |
Consider a chain in the system (densities, pairlist) More... | |
double | InsertCh (int c) |
Displace a chain in the box. More... | |
double | InsertRest (int pCurr, int StartPos) |
Build the rest of the chain. More... | |
double | RemoveChBias (int c) |
Remove a chain in the box. More... | |
double | InsertChBias (int c) |
Put a chain in the box. More... | |
double | WeightSetBond (int p, int t) |
Weight a set of bonds for the configurational bias. More... | |
double | CreateSetBond (int p, int t) |
Create a set of bonds for the configurational bias. More... | |
int | MoveBead (int p) |
Move a particle in the box. More... | |
int | TryInsert () |
Trial insertion. More... | |
int | TryRemove () |
Trial removal. More... | |
int | TryMove () |
Trial movement. More... | |
int | TryMoveCh () |
Trial desplacement of a chain. More... | |
int | TryInsertCh () |
Trial insertion of a chain. More... | |
int | TryRemoveCh () |
Trial removal of a chain. More... | |
int | TryInsertChBias () |
Trial biased insertion of a chain. More... | |
int | TryRemoveChBias () |
Trial biased removal of a chain. More... | |
void | WidomInsert (double *NrgDiff) |
Widom insertion. More... | |
void | WidomRemove (double *NrgDiff, int p) |
Widom removal. More... | |
void | WidomInsertCh (double *NrgDiff) |
Widom insertion. More... | |
void | WidomRemoveCh (double *NrgDiff, int c) |
Widom removal. More... | |
void | WidomBiasChIn (double *Weight) |
Widom with Rosenbluth weight. More... | |
void | WidomBiasChOut (double *Weight, int c) |
Widom with Rosenbluth weight. More... | |
void | VelVerlet1 () |
First step of the velocity Verlet. More... | |
void | LangevinTherm () |
Langevin thermostat. More... | |
void | AndersenTherm () |
Andersen thermostat. More... | |
void | BerendsenTherm () |
Berendsen thermostat. More... | |
void | NoTherm () |
No thermostat. | |
void | VelVerlet2 () |
Second step of the velocity Verlet. More... | |
void | ChooseThermostat (int Mode) |
Choose a calculation mode. More... | |
void | ApplyTherm () |
Pointer to the energy function. | |
int | ForceFieldLine () |
Helfrich Hamiltonian for a line. More... | |
int | SumSomeForces (int HowMany) |
Boh. | |
int | ForceFieldLeaves () |
Helfrich Hamiltonian with an elastic coupling. More... | |
int | ForceFieldBulk () |
Armonic potential on a lattice. More... | |
void | ForceFieldRod () |
Bending potential on a rod. More... | |
void | ForceFieldRigid () |
Interaction between rigid bodies. | |
void | CalcForcesDensFunc () |
Calculate the forces for the density functional. | |
void | PrintForce () |
Print the force and the potential. | |
void | GetForceField () |
Calculate the force field summing every single contribution. | |
void | TabForceAlloc (int NTabExt) |
Tabulate the values of the force. | |
void | TabPot () |
Tabulate the values of the potential. | |
void | NanoInteraction () |
Calculate all the interaction with the nano. | |
double | NanoNrg (int p) |
Exchange energy with the nano. | |
double | NanoNrg (double *Pos, int t) |
Exchange energy with the nano. | |
void | DefForceParam () |
Define the parameters for calculating the force. | |
void | DefNanoForceParam () |
Define the parameters for calculating the force. | |
double | RigidLJ (int nNano, double Dist, double *Pot, double Sign) |
Force between to rigid bodies. | |
double | RigidHamaker (int n, double Dist, double *Pot, double Sign) |
Hamaker potential. More... | |
double | RigidCoulomb (int nNano, double Dist, double *Pot, double Sign) |
Force between to rigid bodies. | |
double | RigidDistanceRad (int n, int nn, double *dr) |
Distance between two bodies. | |
double | RigidDistanceAxis (int n, int nn, double *dr) |
Distance between two bodies. | |
void | PointShape (int iShape) |
double | Harmonic (double Dist2, int t1, int t2, double *Pot) |
Harmonic potential. | |
double | StepPot (double Dist2, int t1, int t2, double *Pot) |
Step potential. | |
double | ElectroPot (double Dist2, int t1, int t2, double *Pot) |
Potential for the electrical lines. | |
double | LJ39 (double Dist2, int t1, int t2, double *Pot) |
Integrated Lennard Jones potential. | |
double | LJPot (double Dist2, int t1, int t2, double *Pot) |
Classical Lennard Jones potential. | |
double | Potential (double Dist, int t1, int t2, double *Pot) |
Pointer to a potential. | |
double | CalcTotNrgCh () |
Calculate and sum up the energy of the chains. More... | |
double | CalcTotNrgBead () |
Calculate and sum up the energy of the part. More... | |
double | CalcNrgBead (int p, double *Pot) |
Pointer to the energy function. | |
double | CalcNrgCh (int c, double *Pot) |
Pointer to the chain energy function. | |
double | NrgChBondDens (int c, double *Pot) |
Calculate the bond and the density functional energies. More... | |
double | NrgChDens (int c, double *Pot) |
Calculate the density functional energies. | |
double | CalcPairwise (int p, double *Pot) |
Calculate the non bonded interaction energy with the neighbouring particles. | |
double | CalcPairwiseCh (int c, double *Pot) |
Calculate the non bonded interaction energy with the neighbouring particles. | |
double | CalcBending (int p) |
Calculate the bonded interaction energy with the neighbouring particles. | |
double | CalcSpring (int p) |
Calculate the spring interaction energy with the neighbouring particles. | |
double | CalcBonded (int p, double *Pot) |
Calculate the spring and the bonded interactions with the other monomers in the chain. More... | |
double | CalcBendingGhost (double *Pos, int pExt) |
Calculate the bending energy for a ghost particle. More... | |
double | CalcBondedCh (int c, double *Pot) |
Calculate the bonded and spring interaction in a cell. | |
void | CalcNrgBeadDensFunc () |
Calculate the spring, bending and non bonded interactions and write it in OldNrgPm. | |
double | CalcNrgBeadDensFunc (int p, double *Pot) |
Calculate the spring, bending and non bonded interactions. More... | |
double | CheckDomDec (int p) |
Check if all the particles are taken in account. More... | |
void | CheckPairList () |
Check the pair list. | |
double | SumForcesMD () |
Iterate all over the particles and calculate the forces. | |
double | Wei3 (const double r, const double a) |
Cubic weighting function. | |
double | DerWei3 (const double r, const double a) |
Derivative of the cubic weighting function. | |
double | Wei2 (const double r, const double b) |
Quadratic weighting function. | |
double | DerWei2 (const double r, const double b) |
Derivative of the quadratic weighting function. | |
double | DensFuncNrgGhost (double *Pos, int p1, int t1) |
Calculation of the energy from the density functional Hamiltonian for the ghost particle. | |
double | DensFuncNrgGhostInternal (double *Pos, int p1, int t1) |
Calculation of the energy from the density functional Hamiltonian for the ghost particle. | |
double | DensFuncNrgBead (int p1) |
Calculation of the energy from the density functional Hamiltonian for the particle p1. | |
double | DensFuncNrgCh (int c, double *Pot) |
Calculate the energy from the density functional Hamiltonian for the chain c. More... | |
double | DensFuncNrgChAv (int c) |
Calculate the average energy from the density functional Hamiltonian for the chain c. | |
double | DensFuncNrgChInternal (int c) |
Calculate the average energy from the density functional Hamiltonian for the chain c. | |
double | DensFuncNrgSys () |
Calculation of the energy from the density functional Hamiltonian for the system. | |
void | CalcDens (int pInit, int pEnd) |
Calculate the local density for the particles between pInit and pEnd. | |
void | ClearDens () |
Set the local densities to zero. | |
double | NrgStep (int p) |
The energy is constant within the cutoff. More... | |
double | NrgStepCh (int c, double *Pot) |
The energy per chain is constant within the cutoff. | |
double | NrgElectro (int p) |
Energy of an electric line. | |
int | AddDens (int pInit, int pEnd) |
Add the densities connected with the particles between pInit and pEnd. | |
int | RemDens (int pInit, int pEnd) |
Substract the densities connected with the particles between pInit and pEnd. | |
double | SumDens (int pInit, int pEnd) |
Sum the local density for the particles between pInit and pEnd and multiply the factors by the virial coefficients. | |
int | ListNeiCell (int p, double *Pos, int *NeiList) |
List of the cells close to the particle position. | |
void | PullBead () |
Move a particle. | |
void | PushBead () |
Move a particle. | |
void | SelectBead (int p) |
Select a particle. | |
void | Wave () |
Sinusoidal surface wave. | |
void | AddCircle (int nNano) |
Add a circle as a boundary condition. | |
void | AddCylinder (int nNano) |
Add a cylinder as a boundary condition. | |
void | AddPore (int nNano) |
Add a pore as a boundary condition. | |
void | AddRigid () |
Add all rigid bodies as a boundary condition. | |
double | HeightBoundary (double *Pos, int dir) |
Height of the boundary condition depending on the direction. More... | |
void | CreateInitial () |
Create an initial configuration and an appropriate force field. | |
void | Create2d () |
Create a plane of connected beads. | |
void | Create3d () |
Create a lattice of connected beads. | |
void | CreateLeaves () |
Create two connected sheets and add a protein. | |
void | CreateStalk () |
Create the 1d representation of a stalk. | |
void | CreatePore () |
Create the 1d representation of a pore. | |
void | Create1d () |
Create single line of connected monomers. | |
void | CreateRigid () |
Create rigid bodies. | |
void | CreateMC () |
Create a initial disposition of particle for the MC sim. | |
void | CreateMD () |
Create a initial disposition of particle for the MD sim. | |
void | CreateRod () |
Create a initial disposition of particle for a stiff rod. | |
void | CreateElectro () |
Create a initial disposition of houses to collect on a line. | |
void | AllocTens () |
Alloc the pressure profile. | |
void | CalcTens () |
Calculate the forces for the tension profile. | |
void | CalcDens () |
Calculate the densities. | |
double | TensRefCart (double *Pos1, double *Pos2, double *PosP1, double *PosP2) |
Particle positions back folded on the tension reference point (Cartesian coordinates) | |
double | TensRefPol (double *Pos1, double *Pos2, double *PosP1, double *PosP2) |
Particle positions back folded on the tension reference point (polar coordinates) | |
double | TensRef (double *Pos1, double *Pos2, double *PosP1, double *PosP2) |
Particle positions back folded on the tension reference point. | |
void | SumTens (int p1, int p2, double Forces, double *DistRel) |
Sum the forces on the line joining the points p1 and p2. | |
void | SumTens (int p1, int p2, double *Pre) |
Sum the forces on the line joining the points p1 and p2. | |
void | SumTens (double *Pos1, double *Pos2, double *Pre) |
Sum the forces on the line joining the points p1 and p2. | |
void | WriteTens (char *TFile, int Comp, double InvNFile) |
Write the pressure and density profile. | |
void | WriteTens2d (FILE *FWrite, int Comp, double InvNFile) |
Write the 2d pressure profile. | |
void | ExplorePepSize () |
Find the minimun bilayer thickness for different peptide sizes. | |
void | ExplorePepSize2d () |
Find the minimun bilayer thickness for different peptide sizes. | |
void | ExploreDoubleMin () |
Find the minimum for different interpeptide distances. | |
void | CalcTotNrg (char *FName, int nFile) |
Total energy of the system. | |
void | CalcNrgPep (char *File2Open, int f) |
Exchange energy of the protein. | |
void | RunDynamics () |
Run a step further. | |
void | RunWidom (char *File2Read, int f) |
Build the widom histograms. | |
void | RunWidomChIn (char *File2Read, int f) |
Build the widom histograms. | |
void | RunWidomChOut (char *File2Read, int f) |
Build the widom histograms. | |
void | RosenIn (FILE *WidomIn) |
Rosenbluth weights for insertion. | |
void | RosenOut (FILE *WidomIn) |
Rosenbluth histograms for deletion. | |
void | RunWidomBiasChOut (FILE *WidomOut) |
Build the widom histograms with Rosenbluth weight. | |
void | ChooseSimMode () |
Choose the simulation method. More... | |
void | Task () |
Perform a operation every time step. | |
void | CalcTens (char **argv, int *FilePos, int NFile) |
Calculate and sum up the pressure profile from the file list. | |
void | AvForces (char **argv, int *FilePos, int NFile) |
Average of the forces. | |
void | Trial () |
Trial loop. | |
void | MinimalMD () |
Minmal md. | |
double | MinimalNrg () |
Minmal nrg. | |
void | Sim1d () |
Simulation loop for 1d. | |
void | Sim2d () |
Simulation loop for 2d. | |
void | Sim3d () |
Simulation loop for 1d. | |
void | SimLeaves () |
Simulation loop for leaves. | |
void | SimRigid () |
Simulation loop for rigid. | |
void | MinimizeSol () |
Iterative process to approach to the solution. | |
int | Interp () |
Show interpolating lines. | |
int | Graphics (int argc, char **argv) |
Initialize the scene. | |
void | keyboard (unsigned char key, int x, int y) |
Additional key bindings. | |
void | DrawSoil () |
Two dimensional soil. | |
void | DrawCarpet () |
Two dimensional surface. | |
void | DrawParticles () |
Alternative drawing of the particle position. | |
void | DrBondLine (int p) |
Alternative drawing of the particle position. | |
void | DrawScene () |
Draw the scene. | |
void | DrawNano () |
Draws cylinder or spheres. | |
void | DynamicsView () |
Idle function to run the dynamics. | |
void | Menu () |
Menu. | |
Public Member Functions inherited from VarData | |
VarData () | |
Set the constants. | |
~VarData () | |
Destructor. | |
void | VarMessage (const char *s,...) |
If enabled call the function position. | |
bool | Open (char *InFile, int BF) |
Open the. More... | |
bool | OpenRisk (char *InFile, int BF) |
Opens a file without reallocationg. | |
bool | OpenTrust (char *InFile, int BF) |
Opens a file checking if the information are correct. | |
void | AllocPart () |
Alloc the structures. | |
void | AllocChain () |
Alloc the structures. | |
Properties | SysProperties () |
Calculate some basis properties. | |
void | SysInfo (char *cSystem) |
Print a string with the system information. | |
void | SysDef (char *cSystem) |
Print a string with the system definitions. | |
char * | SysState () |
Calculates fundamental quantities. | |
void | SetCoeff () |
Set the virial coefficients from the known values of density coex... | |
void | SetCoeff (double *v2, double *v3) |
Set and normalize the virial coefficients from the arrays v2 and v3. | |
double | TwoPartDist (int p1, int p2, double *RelDist) |
Return the relative distance between two particles (wrapped) | |
double | TwoPartDist (double *Pos, int p2, double *RelDist) |
Return the relative distance between two particles (wrapped) | |
double | TwoPartDist2 (int p1, int p2, double *RelDist) |
Return the relative distance between two particles (wrapped) | |
double | TwoPartDist2 (double *Pos, int p2, double *RelDist) |
Return the relative distance between two particles (wrapped) | |
int | TwoPartDist (int p1, int p2, double *RelDist, double CutOff) |
Return the relative distance between two particles (wrapped) if the particles are within the cut off. | |
int | TwoPartDist (double *Pos, int p2, double *RelDist, double CutOff) |
Return the relative distance between two particles (wrapped) if the particles are within the cut off. | |
bool | Write (char *OutFile) |
Writes a "system-file" or a "x y z" file". | |
bool | WriteTxvl (char *OutFile) |
Writes a "system-file" or a "x y z" file". | |
bool | WriteXvt (char *OutFile) |
Writes a "system-file" or a "x y z" file". | |
bool | WriteXyz (char *OutFile) |
Writes a "system-file" or a "x y z" file". | |
void | HeaderInteraction (FILE *FileToWrite) |
Header interactions. | |
void | StringNano (char *NString, int n) |
String for the rigid inclusion in the header file. | |
int | HeaderNano (FILE *FileToWrite) |
Write the nano section of the header to the file. | |
int | HeaderSoft (char *Line) |
Header soft. | |
void | WriteLinkedSurf (FILE *FWrite, double *Plot, int NSample, int NType, double *Bound, int *PId) |
Write the positions of the egdes of the rectangles. | |
void | WriteSurf (FILE *F2Write, double **Plot, int NSample, int OffSet) |
Write the particle position as linked edges of squares. | |
void | ShapeId (int iShape, char *Shape) |
Identifier of the shape. | |
bool | BackFold (int How) |
Backfold the particle position. | |
int | BfDefChain () |
Definition of the chain. | |
int | BfEdge () |
Find the box size if missing. | |
void | DistFromNp () |
Define the distance form the nanoparticle. | |
void | ShiftRef (int BackFold) |
Backfold the system wrt the reference position. | |
int | StalkPos (double *OldPos) |
Find the position of the stalk. | |
void | BfPep () |
Backfold the nano described as a cluster of monomers. | |
void | BackBone (double *Line, int NBin) |
Describe the backbone of a filament. | |
void | StalkLineProf (double *Line, int NBin) |
Describe the line for a linear stalk. | |
void | StalkPos2 (double *OldPos, double *CmStalk) |
Find the position of the stalk second method. | |
void | StalkPos3 (double *OldPos, double *CmStalk) |
Find the position of the stalk third method. | |
int | StalkPos4 (double *OldPos, double *CmStalk) |
Find the position of the stalk forth method. | |
double | NormalWeight (VAR_TRIANGLE *Triang, double *Weight, int NGrid, int NTri) |
Weight of the neighblorung normal on a vertex. | |
void | ConnectLineChain (VAR_LINE *Triang, int NGrid, int NTri) |
Connect the lines in a chain. More... | |
void | ConnectLineChain2 (VAR_LINE *Triang, int NGrid, int NTri) |
Connect the lines in a chain. More... | |
void | ConnectLineChain3 (VAR_LINE *Triang, int NGrid, int NTri) |
Connect the lines in a chain. More... | |
double | PorePos () |
Find the position of the pore. | |
int | Fetch (char *str, char *mask, char *fmt,...) |
Retrive from a string the information concerning the mask. | |
int | BraketPos (char *str, char *mask, int *sPos, int *sLen) |
Retrive from a string the position of the brakets. | |
int | Fetch (char *str, char *mask, int NArg, double *Val) |
Retrive from a string the information concerning the mask. | |
bool | ReadString (const char *String, char *cLine, double *Value) |
Copy the value in the. More... | |
bool | ReadString (const char *String, double *Value, char *line) |
Copy the value in the. More... | |
bool | ReadString (const char *String, char *cLine, int *Value) |
Copy the value in the. More... | |
int | ReadVal (char *pLine, double *Value) |
Copy the value in the String to the Value referring to the position of pLine. | |
int | ReadLineXvt (char *cLine, double *Pos, int *Type) |
Read a single line in format Xvt. | |
bool | ReadConf (char *InFile) |
Reads a "configuration file". | |
void | ReadHeader (FILE *FileToRead) |
Reads a header. | |
void | ReadHeaderTxvl (FILE *FileToRead) |
Reads a header for a txvl file format. | |
void | ReadHeaderXvt (FILE *FileToRead) |
Reads a header of xvl file format. | |
int | ReadPart (FILE *FileToRead) |
Reads particle type and position. | |
int | ReadPartTxvl (FILE *FileToRead) |
Reads a type-position-velocity-link file. | |
int | ReadPartXvt (FILE *FileToRead) |
Reads a position-velocity-type file. | |
int | ReadPartXyz (FILE *FileToRead) |
Reads a x y z file. | |
int | ReadPartXyzt (FILE *FileToRead) |
Reads a x y z t file. | |
int | ReadPassThru (FILE *FileToRead) |
Reads the information to alloc the structure. | |
int | ReadSoft (FILE *ConfFile) |
Reads the specifications about the nano. | |
void | ReadNano (FILE *ConfFile, int NCircle, int NHeight) |
Reads the specifications about the hard object. | |
int | NanoString (char *cLine, int n) |
Reads and set the specifics of the nano. | |
void | SubNanoHeader (char *cFile) |
Substitue the nano header. | |
int | ShapeId (char *Shape) |
Identifier of the shape. | |
int | DefSoft (char *nome2, char *ConfF) |
Define and write the system as described in the conf file. | |
int | TrialSys () |
Creates a trial system. | |
bool | CreateSoft (int *arch, double Thickness, int s) |
Creates an initial system. | |
void | CreateTube (int *arch, double Thickness, int s) |
Soft in a tube shape. | |
void | CreatePlanar (int *arch, double Thickness, int s) |
planar membrane | |
void | CreateVesicle (int *arch, double Thickness, int s) |
vesicle | |
void | CreateCoating (int *arch, double Thickness, int s) |
coating around a cylindrical nanoparticle | |
void | CreateObstacle (int *arch, double Thickness, int s) |
Creates obstacles. | |
int | CheckNano (double *Pos, int s) |
No particle inside the nano. | |
void | AddProtein (int NCircle, int NHeight, int nNano, char *filename) |
Defines the nanoparticle as a net of monomers. | |
void | CreateProtein (int nNano, int nStart) |
Defines the nanoparticle as a net of monomers. | |
void | AddStuffing (char *filename, int nStuffing, int nNano) |
Fill the protein with water. | |
void | AddSolvent (char *filename, int nWater) |
Add phantom solvent at the bottom. | |
void | AddChains (char *filename, double Thickness) |
Add homopolymer chains in the bilayer. | |
void | AddCholesterol (char *filename, double Thickness, int s) |
Add cholesterol chains in the bilayer. | |
void | DefBlock (int *NChStep, int How) |
Define four different blocks. | |
void | DefRest (int *arch, int s) |
set the remaining information | |
int | PutPart (int j, int p, int HalfLim, double sigma) |
return the number in the chain of the next particle put | |
void | FindNeighbours (char *FileName) |
Find the couples of most neighbouring chains. | |
void | SwapChain (int c1, int c2, int b) |
Swap two chains. | |
void | SwapChain (int c1, int c2) |
Swap two cahins. | |
void | SwapPart (int p1, int p2) |
Swap two particle. | |
void | ChangeNChain (int NChain, int b) |
Update the new number of chains. | |
bool | ShiftSys (int How) |
Shift the system accordin to the SHIFT_ definitions. | |
void | SampleSurface (double *Plot, int NSample, int Type) |
Define a normal coordinate for every patch. | |
MOMENTI | SampleSurfacePart (double *Plot, int NSample, int Type) |
Define a normal coordinate for every patch. | |
MOMENTI | SampleSurface (Matrice *Plot, int NSample, int Type) |
Define a normal coordinate for every patch. | |
MOMENTI | SampleSurfaceMem (int NSample) |
Allocate and fill PlotMem with the particle average position. | |
void | LoadDensFile (double **Plot, int NBin) |
Load in the array Plot the density of the system. | |
int | SpatialDerivative (Matrice *Surface, Matrice *Resp, SPLINE Weight, int NSample) |
Perform a spatial derivative on a surface. | |
void | ShiftBlock (Vettore *Shift, int b) |
Shift a block wrt to Shift. | |
void | RotateBlock (Vettore *Axis, Vettore *Origin, int b) |
Rotate a block wrt to the Axis from the Origin. | |
void | MirrorBlock (Vettore *Px1, Vettore *Px2, Vettore *Px3, int b) |
Mirror the position wrt to a plane. | |
void | Transform (int block) |
Transform a block. | |
void | Point2Shape (int iShape) |
Point to the shape function. | |
double | NanoDist2 (double *Pos, int n) |
Pointer to a generic function. | |
double | NanoDist2 (double x, double y, double z, int n) |
Distance from the nanoparticle. | |
double | FieldNo (double *Pos, int n) |
No field. | |
double | FieldSphere (double *Pos, int n) |
Scalar field of a sphere. | |
double | FieldElips (double *Pos, int n) |
Scalar field of a elipsoid. | |
double | FieldParab (double *Pos, int n) |
Scalar field of a elipsoid. | |
double | FieldCyl (double *Pos, int n) |
Scalar field of a cylinder. | |
double | FieldTransMem (double *Pos, int n) |
Scalar field of a transmembrane protein. | |
double | FieldJanus (double *Pos, int n) |
Scalar field of a janus peptide. | |
double | FieldTorus (double *Pos, int n) |
Scalar field of a janus peptide. | |
double | FieldTilt (double *Pos, int n) |
Scalar field of a tilted cylinder. | |
double | FieldBound (double *Pos, int n) |
Scalar field of a hard wall at the box edges. | |
double | FieldTiltWall (double *Pos, int n) |
Scalar field of a tilted cylinder. | |
int | PairCorrelation (double *Point, int NSample, int How, int Type) |
1-d pair correlation | |
int | PairCorrelationRound (double **Point, int NSample, int Type) |
Circular 2-d pair correlation. | |
int | PairCorrelationSquare (double **Point, int NSample, int Type) |
2-d pair correlation on a square | |
int | PairCorrelationPep (double **Point, int NSample, int Type) |
2-d pair correlation on a square fererring to the pep position | |
int | Scattering2d (double **Point, int NSample, int Type) |
2-d Scattering | |
int | Scattering2D (double **Point, int NSample, int Type) |
2-d scattering | |
void | Spettro2d (double *Points, int NSample, int Type) |
1-d spectrum of a surface | |
void | Spettro2d (double *Plot, int NSample) |
2-d spectrum of a sirface | |
int | DensityProfile (int coord, int NSample, int NType, double *dDensity) |
Calculate the density profile for the x, y, z, r coordinate. More... | |
int | Core (double ***Plot, int NSample, double Border[3][2]) |
Sampled three dimentional weighted shape of the system. | |
int | RadDistr (int NSample, double *Plot, double Border[2], int How) |
rzd representation of the system referring to More... | |
int | Worm (int Partition, int NSample, double *Border, double *dPoint) |
Density profile along a worm like micelle. | |
void | VolumeCircSlab (double *VolContr, int NSample) |
Fill an array of. More... | |
void | Stalk (int NSample, int NLevel, double **Plot, double Threshold) |
Following the contour of a stalk. | |
int | Arrange (int **Triangle, int Vertex) |
The naerest. More... | |
int | Folding () |
Boh... | |
int | OrderPos () |
A cell list to be fixed. | |
int | CalcnPos (double *Pos) |
return a univocal index of the chain position | |
int | Neighbour (double *Pos) |
Boh. | |
int | NChainPSquare (double *Plot) |
Distribution of number of chain per patch. | |
int | LateralFluctuation (double *Plot, int LatValue) |
Boh. | |
int | Voronoi () |
Voronoi tassellation. | |
int | PosVectInt (double *Pos) |
Return the integer index with respect to the partition NSquare. | |
int | InterParab (PART *PmIn, PART *PmOut, int NIn, int nOut) |
Discontinous parabolas. | |
int | InterParab2 (PART *PmIn, PART *PmOut, int NIn, int NOut) |
Discontinous parabolas. | |
int | InterCubica (PART *PmIn, PART *PmOut, int NIn, int NOut) |
Discontinous cubic. | |
int | InterForth (PART *PmIn, PART *PmOut, int NIn, int NOut) |
Discontinous forth degree. | |
int | InterSpline3 (PART *PmIn, PART *PmOut, int NIn, int NOut) |
third order spline | |
int | InterSpline4 (PART *PmIn, PART *PmOut, int NIn, int NOut) |
forth order spline | |
int | InterBSpline (PART *PmIn, PART *PmOut, int NIn, int NOut) |
BSpline. | |
int | InterBSpline2D (double **PlIn, double **PmOut, int NIn, int NOut) |
2-d BSpline | |
int | InterBSpline2D (double *PlIn, double *PmOut, int NIn, int NOut) |
2-d BSpline More... | |
int | InterBSpline1D (double *PlIn, double *PmOut, int NIn, int NOut) |
1-d BSpline | |
int | InterPoly (PART *PmIn, PART *PmOut, int NIn, int nOut) |
NIn-polynomian. | |
int | InterDerMatrix (PART *Pm, int NMass, SPLINE Weight, double Offset) |
Boh. | |
void | SmoothGrid (int NSample, char *FWrite) |
Smooth a grid with BSplines. | |
void | SmoothGrid (int NSample) |
Smooth a grid with BSplines and update the particle positions. More... | |
void | ConvoluteMatrix (double *Plot, int NGrid, Matrice *Mask, int NDim) |
Convolute a matrix. | |
void | ConvoluteMatrix1 (double *Plot, int NGrid, Matrice *Mask) |
Convolute a matrix 1d. | |
void | ConvoluteMatrix2 (double *Plot, int NGrid, Matrice *Mask) |
Convolute a matrix 2d. | |
void | ConvoluteMatrix3 (double *Plot, int NGrid, Matrice *Mask) |
Convolute a matrix 3d. | |
int | SetNPart (int NewNPart) |
Set and reallocate the number of particles. | |
int | SetNChain (int NewNCh) |
Set and reallocate the number of chains. | |
int | SetNLink (int NewNCh) |
Set and reallocate the number of links. | |
void | SetNPCh (int NewNCh) |
Set and reallocate the number of particles per chains. | |
void | SetNType (int NewNType) |
Set the number of species. | |
int | AllocLinks (int NewNCh) |
(re)allocate the links | |
int | SetNBlock (int Val) |
Set NBlock. | |
int | SetNNano (int Val) |
Set NNano. | |
void | Copy (PART *P1, PART *P2, int NPartOld) |
Copy the part P2 on part P1. | |
void | Copy (CHAIN *C1, CHAIN *C2, int NChainOld) |
Copy the chain C2 on chain C1. | |
VAR_TRIANGLE * | MarchingCubes (double *Plot, int NSample, double IsoLevel, int *NTri) |
Defines the triangles close to the IsoLevel of the 3d density Plot. | |
VAR_LINE * | MarchingSquares (double *Plot, int NSample, double IsoLevel, int *NTri) |
Defines the triangles close to the IsoLevel of the 3d density Plot. | |
void | AreaDistr (double *Distr, double *RadDistr, int NSample) |
Calculate the (temporal/radial) area distribution. | |
double | pTime () |
Total time. | |
double | pDeltat () |
Delta t. | |
double | pTemp () |
Temperature. | |
double | pBeta () |
Beta factor 1/kTB. | |
double | pEnergy (int d) |
Pot, kinetik, free. | |
double | pEdge (int d) |
xyzr edges of the simulation box | |
double | pInvEdge (int d) |
Inverted xyzr edges of the simulation box. | |
double | pVol () |
xyzr edges of the simulation box | |
double | pCm (int d) |
Center of mass of the system. | |
double | pVelMax (int d) |
Maximum velocity. | |
double | pchiN () |
Incompatibility. | |
double | pkappaN () |
Incompressibility. | |
double | pkBen () |
Bending coupling. | |
double | pkSpr () |
Spring coupling. | |
void | SetkBen (double Val) |
Bending coupling. | |
void | SetkSpr (double Val) |
Spring coupling. | |
void | SetSprRest (double Val) |
Rest distance of the harmonic potential. | |
double | pSprRest () |
Rest distance of the harmonic potential. | |
double | prho () |
Density coexistence. | |
double | pReOverCutOff () |
Re/CutOff. | |
double | pWei2Par () |
Parameter of the second order weighting function. | |
double | pWei3Par () |
Parameter of the third order weighting function. | |
int | pStep () |
Number of steps. | |
int | pNPart () |
Number of particle. | |
int | pNChain () |
Number of chain. | |
int | pNChain (int b) |
Number of chain. | |
int | pNPCh () |
Number of particle per chain. | |
int | pNPCh (int c) |
Number of particle per chain. | |
int | pNType () |
of types of the particle | |
int | pNLink () |
Maximum number of bonds. | |
int | pNNano () |
Number of nanoparticles. | |
int | pNBlock () |
Number of blocks. | |
int | pNAllocP () |
Allocated number of particles. | |
int | pNAllocC () |
Allocated number of chains. | |
void | SetEdge (double Val, int d) |
Set Edge. | |
void | SetCNorm (int d) |
Set Edge. | |
void | SetScaleF (double *Scale) |
Set scale factor. | |
void | SetShiftPos (double *RefPos) |
Set reference pos. | |
void | SetIfNormalize (int If) |
void | SetDeltat (double Val) |
Set DeltaT. | |
void | SetStep (int Val) |
Set Step. | |
void | SetTemp (double Val) |
Set Temperature. | |
void | SetTime (double Val) |
Set Time. | |
void | IncrStep () |
Increment Step. | |
double | pPos (int p, int d) |
Return back folded position. | |
double | pChPos (int p, int d) |
Return back folded position. | |
void | pPos (int p, double *Pos) |
Return back folded position. | |
double * | pPos (int p) |
Print the particle position. | |
double | pPosNoBkf (int p, int d) |
Return the velocity. | |
double | pVel (int p, int d) |
Return the velocity. | |
void | SetPos (int p, double *Pos) |
Set the particle position. | |
void | SetPos (int p, int d, double Pos) |
Set the particle position. | |
void | SetVel (int p, double *Vel) |
Set the particle velocity. | |
void | SetType (int p, int t) |
Set the particle type. | |
int | pType (int p) |
Return the type. | |
int | pChain (int p) |
Return the chain. | |
double | pNanoPos (int n, int d) |
Return back folded nano position. | |
void | SetBkf (int p) |
Set the back folded array for the particle p. | |
void | SetNanoBkf (int n) |
Set the back folded array for the nano n. | |
void | pPos (double *Pos) |
Print a position. | |
Public Attributes | |
CALC_THERM | CalcTherm |
Pointer to the energy calculation function. | |
TENS_REF | Tens_Ref |
Pointer to a coordinate distance. | |
double | IncrDist |
Step to move a particle. | |
double | Deltat |
Time step. | |
double | NChemPotId |
Equilibrium number of particles/chains. | |
double | ChemPotId |
Chemical potential of the particles. | |
double | ChemPotEx |
Chemical potential of the particles. | |
double | GaussVar |
Standard deviation of the gaussian chain. | |
double | CutOff |
Cut off of the interactions. | |
double | Dx |
Spatial separation between particles. | |
double | Viscosity |
Viscosity of the medium. | |
double | Time |
Total time. | |
double | NrgPBead |
Average energy per particle. | |
int | Bead2Move |
Bead to move. | |
int | Old2Move |
Old part to move. | |
int | IntMax |
Boh. | |
int | nEdge [3] |
Number of particle per edge. | |
int | SysShape |
Shape of system. | |
int | CalcMode |
Calculation mode. | |
int | ThermMode |
Thermostat mode. | |
int | SimLimit |
Maximum number of time steps. | |
int | SysAlloc |
Which arrays are allocated. | |
int | IfInterp |
If interpolates with the splines. | |
int | IfLeaves |
Boh. | |
int | IfMove |
Boh. | |
int | IfNano |
Boh. | |
int | IfFillMatrix |
If the matrix has to be changed. | |
int | IfExit |
Exit from the loop. | |
int | NInsertion |
Count accepted moves. | |
int | NRemoval |
Count accepted moves. | |
int | NFile [2] |
First and last file of the list. | |
int | NUpdate |
How many timesteps before redrawing. | |
int | NWrite |
How many timesteps before write the snapshot. | |
int | NSpline |
Total number of points for drawing a spline. | |
KFORCES | Kf |
Prefactor of the forces. | |
FORCES * | Fm |
Array containing the forces for each particle. | |
TENS | Tens |
Structure for the pressure calculation. | |
DomDec * | Pc |
Pair list. | |
PART * | Pl |
Splines. | |
SingProc * | Proc |
GLuint * | Cylinder |
List referring the cylinder. | |
GLuint | Particles |
List referring the particle. | |
int | NShow |
Boh. | |
int | IfMovie |
Produce the images for the video. | |
int | Frame |
Current number of frame. | |
int | IfExt |
Boh. | |
int | IfSpline |
Boh. | |
int | IfRot |
Boh. | |
int | IfSphere |
Visualize spheres or points. | |
int | BeadType |
Boundary condition for a single particle. | |
int | menu |
Menu identifier. | |
int | submenu |
int | IfLine |
Boh. | |
Public Attributes inherited from VarData | |
Matematica * | Mat |
Implementation of all usefull algorythms. | |
MatInt * | MInt |
Matrix of the prefactor of the interactions. | |
NANO_DIST | Nano_Dist |
Pointer to a distance/field function. | |
char | cWhat2Draw [STRSIZE] |
What to draw. | |
NANO * | Nano |
Extra particle. | |
PART * | Pm |
Particle information of all particle. | |
LINKS * | Ln |
Array of linking between the particles. | |
CHAIN * | Ch |
Information on all chains. | |
SOFT * | Soft |
Soft bodies. | |
BLOCK * | Block |
Information for every block. | |
double * | PlotMem |
Particle position/density on the square lattice. | |
double | ShiftPos [3] |
Reference position. | |
double | ScaleF [3] |
Scale factor. | |
int | NSoft |
Number of soft bodies. | |
int | NPartNearSphere |
Number of particle to be considered in the radial density profile. | |
int | NAddChain |
Additional homopolymer chains into the membrane. | |
int | NAddChol |
Additional cholesterol chains into the membrane. | |
int | NSolvent |
Solvent molecules. | |
int | NStuffing |
Stuffing for the cylinder. | |
int | CNorm |
Normal coordinate. | |
int | CLat1 |
lateral coordinate | |
int | CLat2 |
lateral coordinate | |
int | NChType |
Type of chain selected. | |
int | NPType |
Type of particle selected. | |
int | NEdge |
Number of particles per edge. | |
int | SysType |
Contains the definition of the system. | |
int | SysFormat |
Contains the definition of the file format. | |
int | SysCreate |
Contains the information for the creation. | |
int | IfNormalize |
If normalize the lateral dimensions to one. | |
int | IfPlotMem |
If PlotMem is allocated and filled. | |
This class performs the different steps to solve the equations of motion via molecular dynamics simulation, simple grancanonical simulation in Monte Carlo and solution of 1d differential equations.
void StudySys | ( | ) |
Obtain informations for a better performance in inserting the chains.
a
Definition at line 488 of file ForcesIntegration.cpp.
References VarData::CNorm, VarData::InterBSpline1D(), VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, VarData::pNChain(), and VarData::pNPCh().
Referenced by ReadConfDinamica().
void Solve | ( | ) |
Solve a system of four oder differential equation.
Solve a differential equation.
Definition at line 9 of file ForcesLoop.cpp.
References SolveLeaves(), SolveLinksIterative(), SolveRod(), and SysShape.
Referenced by ExploreDoubleMin(), ExplorePepSize(), ExplorePepSize2d(), and keyboard().
void SolveLinks | ( | ) |
Solve a system of four oder differential equation of particles connected by links.
a
Definition at line 109 of file ForcesIntegration.cpp.
References AddRigid(), Matrice::Apply(), VarData::CNorm, FillMatrix(), VarData::Pm, VarData::pNPart(), and PART::Pos.
void SolveLinksIterative | ( | ) |
Solve a system of four oder differential equation of particles connected by links.
It uses Jacobi iterative method to converge to the solution.
Definition at line 47 of file ForcesIntegration.cpp.
References SPLINE::a0, SPLINE::a1, SPLINE::a2, SPLINE::a3, SPLINE::a4, AddRigid(), VarData::CLat1, VarData::CNorm, KFORCES::El, Kf, KFORCES::Lap, LINKS::Link, VarData::Ln, VarData::NEdge, VarData::pEdge(), VarData::Pm, VarData::pNPart(), PART::Pos, Matrice::Print(), KFORCES::SLap, and Matrice::Val().
Referenced by Solve().
void SolveRod | ( | ) |
Solve a system of four oder differential equation of particles connected by links.
a
Definition at line 29 of file ForcesIntegration.cpp.
References Matrice::Apply(), VarData::CNorm, VarData::pEdge(), VarData::Pm, VarData::pNPart(), and PART::Pos.
Referenced by Solve().
void SolveLeaves | ( | ) |
Solve a system of four oder differential equation of particles in a line.
a
Definition at line 5 of file ForcesIntegration.cpp.
References AddRigid(), Matrice::Apply(), VarData::CNorm, VarData::Pm, VarData::pNChain(), VarData::pNPCh(), and PART::Pos.
Referenced by Solve().
void VelVerletRigid | ( | ) |
Velocity Verlet for a rigid body, first step.
Update the position of a rotating cylinder.
Definition at line 321 of file ForcesIntegration.cpp.
References NANO::AMom, Vettore::Angle(), NANO::AVel, NANO::Axis, VarData::BackBone(), Matematica::Casuale(), Matrice::CopyOn(), Vettore::Export(), NANO::Force, NANO::Gamma, NANO::Height, NANO::Mass, VarData::Mat, Matrice::Mult(), VarData::Nano, Vettore::Normalize(), VarData::pDeltat(), VarData::pEdge(), VarData::pNNano(), NANO::Pos, NANO::Rad, Matrice::Set(), Matrice::Transpose(), NANO::Vel, Vettore::VetV(), Vettore::x, and NANO::Zeta.
Referenced by Dynamics(), and SimRigid().
void VelVerletRigid2 | ( | ) |
Velocity Verlet for a rigid body, second step.
a
Definition at line 382 of file ForcesIntegration.cpp.
References NANO::AMom, NANO::AVel, NANO::Force, NANO::Mass, VarData::Nano, VarData::pDeltat(), VarData::pNNano(), and NANO::Vel.
int IfMetropolis | ( | double | ExpArg, |
double | Weight | ||
) |
Metropolis acceptance criterium.
The general version of the Metropolis algorythm.
Definition at line 394 of file ForcesIntegration.cpp.
References Matematica::Casuale(), VarData::Mat, and VarData::pBeta().
Referenced by TryInsert(), TryInsertCh(), TryInsertChBias(), TryMove(), TryMoveCh(), TryRemove(), TryRemoveCh(), and TryRemoveChBias().
int InsertBead | ( | int | p | ) |
Insert a particle in the box.
Insert a particle in the system and in the cell list.
Definition at line 404 of file ForcesIntegration.cpp.
References DdLinkedList::AddPart(), Matematica::Casuale(), VarData::Mat, Pc, VarData::pEdge(), VarData::Pm, and PART::Pos.
Referenced by TryInsert(), and WidomInsert().
void IgnoreCh | ( | int | c | ) |
Ignore a chain in the system (densities, pairlist)
a
Definition at line 532 of file ForcesIntegration.cpp.
References Pc, VarData::Pm, VarData::pNPCh(), PART::Pos, RemDens(), and DdLinkedList::RemPart().
Referenced by ReInsertCh(), and TryMoveCh().
void RemChFromSys | ( | int | c | ) |
Delete a chain in the system.
a
Definition at line 540 of file ForcesIntegration.cpp.
References AddDens(), Pc, VarData::Pm, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), PART::Pos, RemDens(), DdLinkedList::RemPart(), ReSetNChain(), ReSetNPart(), VarData::SwapChain(), and DdLinkedList::SwapPart().
Referenced by TryInsertCh(), TryInsertChBias(), TryRemoveCh(), TryRemoveChBias(), WidomBiasChIn(), and WidomInsertCh().
void SaveCh | ( | int | c | ) |
Save the chain configuration.
a
Definition at line 569 of file ForcesIntegration.cpp.
References VarData::Pm, VarData::pNPCh(), and PART::Pos.
Referenced by TryMoveCh().
void ReInsertCh | ( | int | c | ) |
Reinsert the chain in the previous position.
a
Definition at line 580 of file ForcesIntegration.cpp.
References ConsiderCh(), IgnoreCh(), VarData::Pm, VarData::pNPCh(), and PART::Pos.
Referenced by TryMoveCh().
void ConsiderCh | ( | int | c | ) |
Consider a chain in the system (densities, pairlist)
a
Definition at line 524 of file ForcesIntegration.cpp.
References AddDens(), DdLinkedList::AddPart(), Pc, VarData::Pm, VarData::pNPCh(), and PART::Pos.
Referenced by InsertCh(), and ReInsertCh().
double InsertCh | ( | int | c | ) |
Displace a chain in the box.
Insert a chain in the system and in the cell list.
Definition at line 592 of file ForcesIntegration.cpp.
References CalcMode, Matematica::Casuale(), VarData::CLat1, VarData::CLat2, VarData::CNorm, ConsiderCh(), InsertRest(), VarData::Mat, VarData::Nano, VarData::pEdge(), VarData::Pm, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), PART::Pos, NANO::Pos, VarData::pVol(), NANO::Rad, ReSetNChain(), and ReSetNPart().
Referenced by TryInsertCh(), TryMoveCh(), and WidomInsertCh().
double InsertRest | ( | int | pCurr, |
int | StartPos | ||
) |
Build the rest of the chain.
Insert the remaining particles of the new created chain.
Definition at line 628 of file ForcesIntegration.cpp.
References Matematica::Gaussiano(), GaussVar, VarData::Mat, VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, VarData::pNPCh(), and PART::Pos.
Referenced by InsertCh().
double RemoveChBias | ( | int | c | ) |
Remove a chain in the box.
Remove a chain in the system calculating the weight of the super detailed balance.
Definition at line 724 of file ForcesIntegration.cpp.
References AddDens(), DdLinkedList::AddPart(), CalcBendingGhost(), DensFuncNrgGhost(), NanoNrg(), NrgPBead, Pc, VarData::Pm, VarData::pNPCh(), PART::Pos, RemDens(), DdLinkedList::RemPart(), and WeightSetBond().
Referenced by TryRemoveChBias(), and WidomBiasChOut().
double InsertChBias | ( | int | c | ) |
Put a chain in the box.
Create a chain choosing among a set of different bond vectors with a probability given by their Boltzmann factors.
Definition at line 766 of file ForcesIntegration.cpp.
References AddDens(), DdLinkedList::AddPart(), CalcBendingGhost(), CalcMode, Matematica::Casuale(), VarData::CLat1, VarData::CLat2, VarData::CNorm, CreateSetBond(), DensFuncNrgGhost(), VarData::Mat, VarData::Nano, NanoNrg(), NrgPBead, Pc, VarData::pEdge(), VarData::Pm, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), PART::Pos, NANO::Pos, VarData::pVol(), NANO::Rad, ReSetNChain(), and ReSetNPart().
Referenced by TryInsertChBias(), and WidomBiasChIn().
double WeightSetBond | ( | int | p, |
int | t | ||
) |
Weight a set of bonds for the configurational bias.
Calculate the weights of a set of bonds created for the existing monomer of the chain to remove.
Definition at line 743 of file ForcesIntegration.cpp.
References CalcBendingGhost(), DensFuncNrgGhost(), Matematica::Gaussiano(), GaussVar, VarData::Mat, NanoNrg(), NrgPBead, VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, and PART::Pos.
Referenced by RemoveChBias().
double CreateSetBond | ( | int | p, |
int | t | ||
) |
Create a set of bonds for the configurational bias.
Create a set of bond vectors and choose among them one with a probability given by its Boltzmann weight.
Definition at line 816 of file ForcesIntegration.cpp.
References CalcBendingGhost(), Matematica::Casuale(), DensFuncNrgGhost(), Matematica::Gaussiano(), GaussVar, VarData::Mat, NanoNrg(), NrgPBead, VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, and PART::Pos.
Referenced by InsertChBias().
int MoveBead | ( | int | p | ) |
Move a particle in the box.
Give a new position for the particle p.
Definition at line 448 of file ForcesIntegration.cpp.
References Matematica::Gaussiano(), GaussVar, VarData::Mat, VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, and PART::Pos.
Referenced by TryMove().
int TryInsert | ( | ) |
Trial insertion.
a
Definition at line 413 of file ForcesIntegration.cpp.
References CalcNrgBead(), ChemPotEx, ChemPotId, IfMetropolis(), InsertBead(), Pc, VarData::Pm, VarData::pNPart(), VarData::pVol(), DdLinkedList::RemPart(), and ReSetNPart().
Referenced by Dynamics().
int TryRemove | ( | ) |
Trial removal.
a
Definition at line 432 of file ForcesIntegration.cpp.
References CalcNrgBead(), Matematica::Casuale(), ChemPotEx, ChemPotId, IfMetropolis(), VarData::Mat, Pc, VarData::Pm, VarData::pNPart(), VarData::pVol(), DdLinkedList::RemPart(), ReSetNPart(), DdLinkedList::SwapPart(), and VarData::SwapPart().
Referenced by Dynamics().
int TryMove | ( | ) |
Trial movement.
a
Definition at line 457 of file ForcesIntegration.cpp.
References CalcNrgBead(), Matematica::Casuale(), IfMetropolis(), VarData::Mat, MoveBead(), DdLinkedList::MovePart(), Pc, VarData::Pm, VarData::pNPart(), and PART::Pos.
Referenced by Dynamics().
int TryMoveCh | ( | ) |
Trial desplacement of a chain.
a
Definition at line 649 of file ForcesIntegration.cpp.
References CalcNrgCh(), Matematica::Casuale(), IfMetropolis(), IgnoreCh(), InsertCh(), VarData::Mat, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), ReInsertCh(), ReSetNChain(), ReSetNPart(), and SaveCh().
Referenced by Dynamics().
int TryInsertCh | ( | ) |
Trial insertion of a chain.
a
Definition at line 697 of file ForcesIntegration.cpp.
References CalcNrgCh(), ChemPotEx, ChemPotId, IfMetropolis(), InsertCh(), VarData::pNChain(), VarData::pNPCh(), VarData::pVol(), and RemChFromSys().
Referenced by Dynamics().
int TryRemoveCh | ( | ) |
Trial removal of a chain.
a
Definition at line 675 of file ForcesIntegration.cpp.
References CalcNrgCh(), Matematica::Casuale(), ChemPotEx, ChemPotId, IfMetropolis(), VarData::Mat, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), VarData::pVol(), and RemChFromSys().
Referenced by Dynamics().
int TryInsertChBias | ( | ) |
Trial biased insertion of a chain.
a
Definition at line 873 of file ForcesIntegration.cpp.
References ChemPotEx, ChemPotId, IfMetropolis(), InsertChBias(), VarData::pNChain(), VarData::pNPCh(), VarData::pVol(), and RemChFromSys().
Referenced by Dynamics().
int TryRemoveChBias | ( | ) |
Trial biased removal of a chain.
a
Definition at line 854 of file ForcesIntegration.cpp.
References Matematica::Casuale(), ChemPotEx, ChemPotId, IfMetropolis(), VarData::Mat, VarData::pNChain(), VarData::pNPart(), VarData::pNPCh(), VarData::pVol(), RemChFromSys(), and RemoveChBias().
Referenced by Dynamics().
void WidomInsert | ( | double * | NrgDiff | ) |
Widom insertion.
a
Definition at line 890 of file ForcesIntegration.cpp.
References CalcBendingGhost(), DensFuncNrgGhost(), InsertBead(), NanoNrg(), Pc, VarData::Pm, VarData::pNPart(), and DdLinkedList::RemPart().
Referenced by RunWidom().
void WidomRemove | ( | double * | NrgDiff, |
int | p | ||
) |
Widom removal.
a
Definition at line 901 of file ForcesIntegration.cpp.
References CalcNrgBead().
Referenced by RunWidom().
void WidomInsertCh | ( | double * | NrgDiff | ) |
Widom insertion.
a
Definition at line 908 of file ForcesIntegration.cpp.
References CalcNrgCh(), InsertCh(), VarData::pNChain(), VarData::pNPCh(), and RemChFromSys().
Referenced by RunWidomChIn().
void WidomRemoveCh | ( | double * | NrgDiff, |
int | c | ||
) |
Widom removal.
a
Definition at line 918 of file ForcesIntegration.cpp.
Referenced by RunWidomChOut().
void WidomBiasChIn | ( | double * | Weight | ) |
Widom with Rosenbluth weight.
a
Definition at line 926 of file ForcesIntegration.cpp.
References InsertChBias(), VarData::pNChain(), VarData::pNPCh(), and RemChFromSys().
Referenced by RosenIn().
void WidomBiasChOut | ( | double * | Weight, |
int | c | ||
) |
Widom with Rosenbluth weight.
a
Definition at line 935 of file ForcesIntegration.cpp.
References RemoveChBias().
Referenced by RosenOut().
void VelVerlet1 | ( | ) |
First step of the velocity Verlet.
a
Definition at line 942 of file ForcesIntegration.cpp.
References FORCES::Dir, FORCES::Ext, Fm, VarData::pDeltat(), VarData::pEdge(), VarData::pInvEdge(), VarData::Pm, VarData::pNPart(), PART::Pos, and PART::Vel.
Referenced by Dynamics(), Sim1d(), Sim2d(), Sim3d(), SimLeaves(), and SimRigid().
void LangevinTherm | ( | ) |
Langevin thermostat.
a
Definition at line 957 of file ForcesIntegration.cpp.
References Matematica::Casuale(), FORCES::Dir, Fm, VarData::Mat, VarData::pDeltat(), VarData::Pm, VarData::pNPart(), PART::Vel, and Viscosity.
Referenced by ChooseThermostat().
void AndersenTherm | ( | ) |
Andersen thermostat.
a
Definition at line 971 of file ForcesIntegration.cpp.
References Matematica::Casuale(), Matematica::Gaussiano(), VarData::Mat, VarData::pDeltat(), VarData::Pm, VarData::pNPart(), VarData::pTemp(), and PART::Vel.
Referenced by ChooseThermostat().
void BerendsenTherm | ( | ) |
Berendsen thermostat.
a
Definition at line 984 of file ForcesIntegration.cpp.
References FORCES::Dir, Fm, VarData::pDeltat(), VarData::Pm, VarData::pNPart(), and PART::Vel.
Referenced by ChooseThermostat().
void VelVerlet2 | ( | ) |
Second step of the velocity Verlet.
a
Definition at line 1029 of file ForcesIntegration.cpp.
References FORCES::Dir, FORCES::Ext, Fm, VarData::pDeltat(), VarData::Pm, VarData::pNPart(), and PART::Vel.
Referenced by Dynamics(), NoTherm(), Sim1d(), Sim2d(), Sim3d(), SimLeaves(), and SimRigid().
void ChooseThermostat | ( | int | Mode | ) |
Choose a calculation mode.
a
Definition at line 1003 of file ForcesIntegration.cpp.
References AndersenTherm(), BerendsenTherm(), CalcTherm, LangevinTherm(), and NoTherm().
Referenced by AllocMethod(), and NoTherm().
int ForceFieldLine | ( | ) |
Helfrich Hamiltonian for a line.
Use different types of splines to interpolate the points and calculate the second and forth derivative.
Definition at line 4 of file ForcesForceField.cpp.
References SPLINE::a2, SPLINE::a4, Matematica::Cubica(), FORCES::Dir, Dx, FORCES::Ext, Fm, Matematica::Forth(), IfInterp, Kf, KFORCES::Lap, VarData::Mat, Matematica::Parab(), Matematica::Parab2(), VarData::Pm, VarData::pNPart(), PART::Pos, KFORCES::SLap, Matematica::Spline3(), Matematica::Spline3Beg(), Matematica::Spline3End(), Matematica::Spline4(), and Matematica::Spline4Beg().
Referenced by ApplyTherm(), Dynamics(), and Sim1d().
int ForceFieldLeaves | ( | ) |
Helfrich Hamiltonian with an elastic coupling.
Use different types of splines to interpolate the points and calculate the second and forth derivative, the two sheets have an elastic coupling.
Definition at line 130 of file ForcesForceField.cpp.
References SPLINE::a2, SPLINE::a4, FORCES::Dir, Dx, FORCES::Ext, Fm, Matematica::Forth(), Kf, KFORCES::Lap, KFORCES::LJ, VarData::Mat, VarData::Nano, VarData::NEdge, VarData::Pm, VarData::pNChain(), VarData::pNPart(), PART::Pos, NANO::Pos, NANO::Rad, KFORCES::SLap, Matematica::Spline3(), Matematica::Spline3End(), and Matematica::Spline4Beg().
Referenced by ApplyTherm(), Dynamics(), and SimLeaves().
int ForceFieldBulk | ( | ) |
Armonic potential on a lattice.
Calculate the harmonic potential along the links.
Definition at line 187 of file ForcesForceField.cpp.
References FORCES::Dir, KFORCES::El, KFORCES::Elong, FORCES::Ext, Fm, Kf, LINKS::Link, VarData::Ln, LINKS::NLink, VarData::Pm, and VarData::pNPart().
Referenced by ApplyTherm(), Dynamics(), and Sim3d().
void ForceFieldRod | ( | ) |
Bending potential on a rod.
Calculate the harmonic potential along the links.
Definition at line 210 of file ForcesForceField.cpp.
References FORCES::Dir, Fm, VarData::pkBen(), VarData::pkSpr(), VarData::pNBlock(), VarData::pNChain(), VarData::pNPCh(), VarData::pSprRest(), and VarData::TwoPartDist().
Referenced by ApplyTherm(), and Dynamics().
double RigidHamaker | ( | int | n, |
double | Dist, | ||
double * | Pot, | ||
double | Sign | ||
) |
Hamaker potential.
Hamker Physica IV 10 p 1058 (1937)
Definition at line 458 of file ForcesForceField.cpp.
References NANO::BaseLine, NANO::DistThr, NANO::ForThr, NANO::Hamaker, VarData::Nano, NANO::PotThr, and NANO::Rad.
Referenced by ApplyTherm(), DefNanoForceParam(), and NanoNrg().
double CalcTotNrgCh | ( | ) |
Calculate and sum up the energy of the chains.
Fill the array OldNrgCh with the non bonded, spring and bending energy.
Definition at line 411 of file ForcesCalcEnergies.cpp.
References CalcNrgCh(), VarData::pNChain(), VarData::pNPCh(), and Shout().
Referenced by CalcTotNrg(), Potential(), and RunWidomChOut().
double CalcTotNrgBead | ( | ) |
Calculate and sum up the energy of the part.
Fill the array OldNrgCh with the non bonded, spring and bending energy.
Definition at line 470 of file ForcesCalcEnergies.cpp.
References CalcNrgBead(), VarData::pNChain(), and Shout().
Referenced by Potential().
double NrgChBondDens | ( | int | c, |
double * | Pot | ||
) |
Calculate the bond and the density functional energies.
Calculate the bonded and non bonded energies for the chain c.
Definition at line 435 of file ForcesCalcEnergies.cpp.
References CalcBondedCh(), DensFuncNrgChInternal(), and VarData::pNPCh().
Referenced by CalcNrgCh().
double CalcBonded | ( | int | p, |
double * | Pot | ||
) |
Calculate the spring and the bonded interactions with the other monomers in the chain.
Calculates the spring and bending force between B / \ A C.
Definition at line 29 of file ForcesCalcEnergies.cpp.
References VarData::pkBen(), VarData::pkSpr(), VarData::Pm, VarData::pNPart(), PART::Pos, and VarData::pSprRest().
Referenced by CalcNrgBeadDensFunc(), and CalcNrgCh().
double CalcBendingGhost | ( | double * | Pos, |
int | pExt | ||
) |
Calculate the bending energy for a ghost particle.
Calculates the bending force between B / \ A C if the ghost particle C is at least the third in the chain.
Definition at line 80 of file ForcesCalcEnergies.cpp.
References VarData::pChain(), VarData::pEdge(), VarData::pInvEdge(), VarData::pkBen(), VarData::pNPCh(), and VarData::pPos().
Referenced by CalcNrgCh(), CreateSetBond(), InsertChBias(), RemoveChBias(), WeightSetBond(), and WidomInsert().
double CalcNrgBeadDensFunc | ( | int | p, |
double * | Pot | ||
) |
Calculate the spring, bending and non bonded interactions.
Calculate the bonded and non bonded energies for the chain c.
Definition at line 494 of file ForcesCalcEnergies.cpp.
References CalcBonded(), and DensFuncNrgBead().
double CheckDomDec | ( | int | p | ) |
Check if all the particles are taken in account.
Compare the pair found in the domain decomposition method with the ones found with the simple N^2 neighbours search.
Definition at line 658 of file ForcesCalcEnergies.cpp.
References DomDecBasics::cCurr, KFORCES::CutOff2, DdLinkedList::Dist2Curr(), DdLinkedList::IfCurr(), Kf, DdLinkedList::NextCurr(), DomDecBasics::p2Curr, Pc, VarData::pEdge(), VarData::pInvEdge(), VarData::pNPart(), VarData::pPos(), and DdLinkedList::SetCurr().
Referenced by CalcNrgCh().
double DensFuncNrgCh | ( | int | c, |
double * | Pot | ||
) |
Calculate the energy from the density functional Hamiltonian for the chain c.
Calculate the bonded and non bonded energies for the chain c.
Definition at line 428 of file ForcesCalcEnergies.cpp.
References DensFuncNrgChInternal(), NanoNrg(), and VarData::pNPCh().
Referenced by CalcNrgCh(), and CalcPairwise().
double NrgStep | ( | int | p | ) |
The energy is constant within the cutoff.
Step potential.
Definition at line 153 of file ForcesCalcEnergies.cpp.
References KFORCES::CutOff2, DdLinkedList::Dist2Curr(), DdLinkedList::IfCurr(), Kf, KFORCES::LJ, DdLinkedList::NextCurr(), DomDecBasics::p2Curr, Pc, VarData::Pm, VarData::pType(), and DdLinkedList::SetCurr().
Referenced by CalcNrgCh().
double HeightBoundary | ( | double * | Pos, |
int | dir | ||
) |
Height of the boundary condition depending on the direction.
The boundary condition depends on the lateral distance from the border.
Definition at line 88 of file ForcesBoundary.cpp.
References NANO::Height, VarData::Nano, VarData::pNNano(), NANO::Pos, and NANO::Rad.
Referenced by ListNeiCell().
void ChooseSimMode | ( | ) |
Choose the simulation method.
main loop
Definition at line 3 of file ForcesLoop.cpp.
References SysShape.
Referenced by TensRef().