Allink  v0.1
Public Types | Public Member Functions | Public Attributes
Forces Class Reference

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>

Inheritance diagram for Forces:
VarData

List of all members.

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 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.
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.
void SolveLinks ()
 Solve a system of four oder differential equation of particles connected by links.
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.
void SolveRod ()
 Solve a system of four oder differential equation of particles connected by links.
void SolveLeaves ()
 Solve a system of four oder differential equation of particles in a line.
int Update ()
 Boh.
void VelVerletRigid ()
 Velocity Verlet for a rigid body, first step.
void VelVerletRigid2 ()
 Velocity Verlet for a rigid body, second step.
int IfMetropolis (double ExpArg, double Weight)
 Metropolis acceptance criterium.
int InsertBead (int p)
 Insert a particle in the box.
void IgnoreCh (int c)
 Ignore a chain in the system (densities, pairlist)
void RemChFromSys (int c)
 Delete a chain in the system.
void SaveCh (int c)
 Save the chain configuration.
void ReInsertCh (int c)
 Reinsert the chain in the previous position.
void ConsiderCh (int c)
 Consider a chain in the system (densities, pairlist)
double InsertCh (int c)
 Displace a chain in the box.
double InsertRest (int pCurr, int StartPos)
 Build the rest of the chain.
double RemoveChBias (int c)
 Remove a chain in the box.
double InsertChBias (int c)
 Put a chain in the box.
double WeightSetBond (int p, int t)
 Weight a set of bonds for the configurational bias.
double CreateSetBond (int p, int t)
 Create a set of bonds for the configurational bias.
int MoveBead (int p)
 Move a particle in the box.
int TryInsert ()
 Trial insertion.
int TryRemove ()
 Trial removal.
int TryMove ()
 Trial movement.
int TryMoveCh ()
 Trial desplacement of a chain.
int TryInsertCh ()
 Trial insertion of a chain.
int TryRemoveCh ()
 Trial removal of a chain.
int TryInsertChBias ()
 Trial biased insertion of a chain.
int TryRemoveChBias ()
 Trial biased removal of a chain.
void WidomInsert (double *NrgDiff)
 Widom insertion.
void WidomRemove (double *NrgDiff, int p)
 Widom removal.
void WidomInsertCh (double *NrgDiff)
 Widom insertion.
void WidomRemoveCh (double *NrgDiff, int c)
 Widom removal.
void WidomBiasChIn (double *Weight)
 Widom with Rosenbluth weight.
void WidomBiasChOut (double *Weight, int c)
 Widom with Rosenbluth weight.
void VelVerlet1 ()
 First step of the velocity Verlet.
void LangevinTherm ()
 Langevin thermostat.
void AndersenTherm ()
 Andersen thermostat.
void BerendsenTherm ()
 Berendsen thermostat.
void NoTherm ()
 No thermostat.
void VelVerlet2 ()
 Second step of the velocity Verlet.
void ChooseThermostat (int Mode)
 Choose a calculation mode.
void ApplyTherm ()
 Pointer to the energy function.
int ForceFieldLine ()
 Helfrich Hamiltonian for a line.
int SumSomeForces (int HowMany)
 Boh.
int ForceFieldLeaves ()
 Helfrich Hamiltonian with an elastic coupling.
int ForceFieldBulk ()
 Armonic potential on a lattice.
void ForceFieldRod ()
 Bending potential on a rod.
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.
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.
double CalcTotNrgBead ()
 Calculate and sum up the energy of the part.
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.
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.
double CalcBendingGhost (double *Pos, int pExt)
 Calculate the bending energy for a ghost particle.
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.
double CheckDomDec (int p)
 Check if all the particles are taken in account.
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.
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.
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.
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.
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 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.
FORCESFm
 Array containing the forces for each particle.
TENS Tens
 Structure for the pressure calculation.
DomDecPc
 Pair list.
PARTPl
 Splines.
SingProcProc
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.

Detailed Description

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.

Definition at line 223 of file Forces.h.


Member Function Documentation

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.

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 ( )
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)
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)
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)
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 ( )
int TryRemove ( )
int TryMove ( )
int TryMoveCh ( )
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 ( )
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 ( )
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 ( )
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(), 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().

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 Dynamics(), and Sim1d().

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 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 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 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 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(), 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().

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().

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().

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 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().

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().

double NrgStep ( int  p)
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.

void ChooseSimMode ( )

Choose the simulation method.

main loop

Definition at line 3 of file ForcesLoop.cpp.

References SysShape.


The documentation for this class was generated from the following files: