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

Operates and visualizes the information in the VarData class. More...

#include <ElPoly.h>

Inheritance diagram for ElPoly:
VarData

List of all members.

Public Types

typedef void(ElPoly::* DRAW_PART )(int p)
 Data type for distance/field functions.
typedef void(ElPoly::* DRAW_BOND )(double *Pos1, double *Pos2, float *Color)
 Data type for distance/field functions.

Public Member Functions

 ElPoly (int argc, char **argv, int *FilePos)
 Constructor.
 ~ElPoly ()
 Desctructor.
int DensProf (int NBin, int NSample, int Coord)
 Calculate the density profile dens.
void DensProfNormalSlab (int NBin, int NSample, int Coord)
 Calculate the density profile projecting the particles on the normal density.
int Diff2Files (int NBin, int How)
 Density and thickness profile arond the nanoparticle.
void RestPress (int NBin)
 Pressure difference between the virial and the ideal gas term.
void SlabProf (int NBin, int nNano, int Coord1)
 Thickness and density profile along Coord1.
void PrintDens (FILE *FileToWrite, double **Plot, double *LatDim, int NBin)
 Print the density profile in the surfaces representation.
void RadDens2Thick (int NBin)
 Calculate the thickness from the radial density profile.
void RadDens2Thick2d (int NBin)
 Calculate the thickness from the radial density profile.
int Temperature (int NBin, int Coord)
 Spatial distribution of the temperature.
void CartDens (int NBin, int nNano)
 3d (rad,norma,dens) density profile in cartesian coordinates
void RadDistrF (int NBin, int How, int nNano)
 3d (rad,norma,dens) density profile with respect to a initial position radNano radCm radCmN
void BondDistr (int NSample)
 Distribution of the bond lengths.
void E2EDistr (int NSample)
 Distribution of end to end distances.
void SplayDistr (int NSample)
 Distribution of end to end distances.
int RadialShell (int NBin)
 Outer shell of a projected (rad,normal) graph.
int NanoParticle (int NBin)
 Diffusion and density profile around the nanoparticle nano.
int WormF (int Partition, int NBin)
 Density profile of a non straight worm shape membrane worm.
void StalkF (int NSample)
 Separate the leaflets.
void ThickFromDens (int NBin)
 Calculate the thickness profile from the density plot.
void AreaDistrF (int NBin)
 Distribution of the areas around the protein.
void RadNormPos (int NBin, int NGrid)
 Radial profile of the normal position of the particles.
int SurfTens (int NBin)
 Radial summation of the 3d tension profile.
void SumTens ()
 Sum more tension profile files.
int PressTrace ()
 Trace of the pressure profile.
int PressRadial ()
 Contour plot around the inclusion.
int Tens2dCartRad ()
 Change the pressure profile from cartesian to radial.
void StalkLineProfF (int NBin)
 Write the line describing a linear stalk.
void Prova ()
 Dummy function to operate on a sequence of files.
void PairCorr (int NBin, int NDim)
 1d pair correlation
int PairCorrelationF (int NBin, int How)
 1d, 2d pair correlation of the chains pairRound pairSquare (obsolete)
int Diffusivity ()
 Diffusivity coefficient of the chains diff.
void DiffSlab (int NSlab)
 Diffusivity of particles starting from an initial slab.
int ScatteringF (int NBin, int How)
 2d Scattering scatt scatt2
int NChainPSquareF ()
 Calculates the number of chain per area area.
void AreaCompr (int NSample)
 Calculates the number of chain per area area.
int SpectrumF (int NBin)
 Calculates the 1d, 2d spectrum spe.
void Midplane (int NBin)
 Midplanes for a sequence of snapshots.
void SpectrumMidplane (int NBin)
 Calculates the 1d, 2d spectrum spe.
void HeaderAverage (int nNano)
 Read the header and average the information.
void WidomOut (char *InFile, int NBin)
 Create a system file with a chain less and the information about the missing chain.
void WidomOut ()
 Create NCh systems with a chain less.
void WidomIn (char *InFile, int NBin)
 Create the histogram of the energy of adding lipids.
void WidomIn ()
 Create a set of files with a chain more.
void End2EndDistr (char *OutFile)
 Write the end to end distance of the chains.
void BondDistr (char *OutFile, int NBin)
 Write the bond distance between the monomers.
void Decoupling (int What)
 Decoupling of the direction/end to end distance of the chains.
void ElasticCoupling (int NSample)
 Measure the elastic coupling between the two sheets.
void ElasticCouplingNVT ()
 Measure the elastic coupling between the two sheets.
void BilayerDistance (char *OutFile, int NBin)
 Measure the elastic coupling between the two sheets.
void EndToEndDist ()
 Distribution of the end to end distances.
int ProjectionF (int NBin, int Coord)
 Projection of the system against one direction pro.
int CoreF (int NBin, int How)
 Sampling of the three dimentional space.
int Surface (int NBin, int Coord)
 Area of a surfuce projected on the coordinate Coord surf.
int From3To2d (int Coord, double Param)
 Project the velocities of a 3d system on a 2d system wrt a coordinate.
int From2To1d (int Coord)
 Projet a 2d system on one of the two coordinates.
int From3To1d (int Coord)
 Project a 3d system on one coordinate.
void IsoSurf (int NSample, double *IsoValue, int NIso)
 Density plot all over different snapshots and calculation of the isolevel surface.
void IsoLine (int NSample, double *IsoValue, int NIso, int How)
 Calculate the discrete density of the system and the correspondent isolines.
void IsoLine (FILE *F2Write, double *Plot, int NSample, double *IsoLevel, int NIso)
 Perform the marching cubes on a density plot and print the isolines.
void FetchStalk ()
 Write the position of the stalk for every snapshot.
void FetchPore ()
 Write the position of the pore for every snapshot.
void StalkArea ()
 Area of hydrophobic in the torus.
void AvSnap ()
 Average the postion of the lipids over many snapshots.
void SlabAngleProfs (int NBin, int NAngle, int Coord)
 Radial profiles of the slab density between 0⁰ and 90⁰ subdivided in NAngle angles.
void Sample (int NSample)
 Sample the space in NSample lattice points.
void Conv2Tecplot (int NBin, int How)
 Prepare a countor plot for tecplot.
void Conv2Vmd ()
 esport the data in vmd file format
void Conv2Povray ()
 esport the data in pov file format for rendering
void Conv2rzd (int NSample)
 esport the data in radius depth density file format
void Conv2xyzd (int NSample)
 esport the data in radius depth density file format
void DrField (int NGrid, double IsoLevel, int nNano, FILE *FWrite)
 Draw a scalar field.
void DrBondPovRay (double *Pos1, double *Pos2, float *Color)
 Draw the bonds.
void HeaderPovRay ()
 Print the header for povray.
void DrNanoPovRay (int n)
 PovRay draw function.
void DrPartPovRay (int p)
 PovRay draw function.
void ConvLattice (int NSample, char *FName)
 Convert into a square lattice.
void RemoveChains ()
 Remove chains satisfying a condition.
int Angle (int NBin)
 Calculation of the contact angle angle Boh?
double ContactAngle (double x)
 Definition of the contact angle function Boh.
int CenterOfMass (int Coord)
 Averaged center of mass Boh.
int ChangeFile ()
 Defines the first and the last file to be elaborated file.
int SpecifyCoord ()
 Defines the normal coordinate coord.
int OpenFile (int f)
 Opens the f file of the list open.
int OpenFile (char *FileName)
 Opens a file.
int PropertiesF ()
 Calculates some properties of the system prop.
char * ChooseDraw (int ExtWhat2Draw)
 Convert the internal definition for the menu of ElPoly in string.
void ChooseDraw (char *String)
 Assing the correct value of What2Draw from.
void DivideLayers (int How)
 Reorder the LIPID block in four different layers.
void SetBoundFile (int InitFile, int EndFile)
 Set the initial and final number of files.
void Processing (int f)
 Information on the current file elaborated.
void Shift2Center ()
 Shift the system to the center.
void SetBackFold (int Bf)
 Set backfold type.
void SetNVisSkip (int NSkip)
 Set backfold type.
void RenderPart (void)
 Choose the visualisation (obsolete)
void DrRunTime ()
 Draws in run time (expensive)
void DrColor ()
 Visualisation of the particle system with velocity color scheme.
void DrPartList ()
 Create a list of all the particles.
void DrVector (Vettore v, Vettore Origin)
 Draw a vector.
void DrVectors ()
 Draw the chains as vectors.
int DrIntorno (int p, double Blue)
 Visualize only particles within a certain distance.
void DrCrossLinks ()
 Visualize the cross links.
int Graphics (int argc, char **argv)
 Boh.
void ESlide ()
 Sequence of pictures.
void ESlide1 ()
 Sequence of pictures.
void DrProtein (const char *FileName, int nBlock)
 Load and draw the linking of a protein.
void DrNano ()
 Draw the nanoparticle structure.
void DrCrossLinks (char *FileName)
 Draw the cross linked particles.
void DrawPart (int p)
 Pointer to a generic function.
void DrPartOpenGl (int p)
 OpenGl draw function.
void DrawNano (int n)
 Pointer to a generic function.
void DrNanoOpenGl (int n)
 OpenGl draw function.
void DrawFuncHeader ()
 Assign the pointer to the corrispondent draw function, intilize the visualization.
void DrawFuncFooter ()
 Dnd the visualization.
void DrBond (int p)
 Finde the neighbour of the particle p and draw the bond.
void DrawBond (double *Pos1, double *Pos2, float *Color)
 Pointer to a generic function.
void DrBondNo (double *Pos1, double *Pos2, float *Color)
 Null function.
void DrBondOpenGl (double *Pos1, double *Pos2, float *Color)
 Draw the bonds.
void keyboard (unsigned char key, int x, int y)
 Draws all the particles and bonds.
void ElDrawMouse (int button, int state, int x, int y)
 Scaling.
void CompileList ()
 Compile the list with some useful primitives.
void DrPosCol ()
 Boh.
void Menu ()
 Creates the menu.
void ElMenuChoise (int option)
 Choose what to visualize.
void ElMenuVisual (int option)
 Choose what to visualize.
void CreateMenu ()
 Creates the menu.
void DrIsoipse (int NBin, int NIsoipse, int CoordN)
 Draws all the same quotes surfaces.
void DrSurface ()
 Draws the surface like a sheet using the chains position.
void DrSmooth (double *Plot, int NSample, double Min, double Max)
 Draw the surface in triangles.
void DrSample (int NSample)
 Samples the surface and draws it in triangles.
void DrSpectrum ()
 Calculate the spectrum of the surface and draws it in triangles.
void DrDerivative ()
 Samples the surface, applies a 2d matrix derivative and draws the surface in triangles.
void DrChains ()
 Position of every chain in hexagons.
void DrPolygon ()
 Every particle is traeted as a vertex.
void DrQuad ()
 Call a square in every particle position.
void DrDensity ()
 (rad,norm,dens) visualisation
void DrQuad1 ()
 Intensity scheme.
void DrPotential ()
 Potential function.
void DrShell ()
 Draw the outer shell.
void DrVoronoi ()
 Voronoi tassellation.
void DrInterpSurface ()
 Boh.
void DrIsolevel (int NSample, double IsoLevel)
 Defines the triangles at the boundaries of the density close to the IsoLevel value.
void DrField (int NGrid, double IsoLevel, int nNano)
 Draw a scalar field.
void DrSquareMesh ()
 Draw the polygons for a square mesh.
void DrNormalPoint (int p, int NEdge)
 Draw the normal to a point.
void DrTria (Vettore *v00, Vettore *v01, Vettore *v11, Vettore *vN)
 single triangle defined by three vectors
void DrTriaContour (Vettore *v00, Vettore *v01, Vettore *v11)
 Draw the contour of three vectors.
void DrDoubleTria (Vettore *v00, Vettore *v01, Vettore *v11, Vettore *v10, Vettore *vN)
 Double triangle defined by four vectors.
void DrCreateStalk ()
 Visualize the surface calculated in Stalk()
void DrStalk ()
 Visualize the surface from Stalk.xvl.
void Tile ()
 Cover a regular square grid of points with tiles.
void DrTriangulate ()
 Triangulate a surface.
void DrMesh ()
 Build a mesh from the lipid positions.
void DrGenMesh ()
 Generate a mesh from a function.
void DrCells ()
 Construct cells from the lipid positions.
void DefineSkin (int NSample)
 Find the covering surface for given points.
void DefineSurf ()
 Find the covering surface for given points.

Public Attributes

DRAW_PART Draw_Part
 Pointer to a distance/field function.
DRAW_PART Draw_Nano
 Pointer to a distance.
DRAW_BOND Draw_Bond
 Pointer to a distance/field function.
GLuint Quad
GLuint Point
GLuint * Cylinder
GLuint MetalCylinder
GLuint Hexagon
GLuint Cube
GLuint Arrow
GLuint GlWall
double Saturation
 Saturation of the color (increase intensity)
char Block2Draw [20]
 Name of the block to draw.
int NFile [2]
 First and last file of the list.
int NFileTot
 Total number of file.
int NPro
 Boh.
int quando
 Current number of the file list.
int LineSize
 Line size of the gl.
int IfIntorno
 If it visualizes only the particles/chains within a certain distance.
int IfLine
 Boh.
int IfChType
 Type of the chains to be visualized.
int NBackFold
 Type of backfold.
int What2Draw
 Draw the content in the appropriate visulization.
int NVisSkip
 How many lipids are skipped in the visualization.
int DrawOutput
 Boh.
double Vicinanze
 Boh.
double InvScaleUn
 Define the shrink factor between the box edges.
double ExtParam
 External parameter (e.g. for MarchingCubes)
double ScaleFact
 Normal scaling factor (z zooming)
FILE * DrawOutFile
 Output file for drawing.
SingProcProc

Detailed Description

Operates and visualizes the information in the VarData class.

Definition at line 61 of file ElPoly.h.


Member Function Documentation

int DensProf ( int  NBin,
int  NSample,
int  Coord 
)
void DensProfNormalSlab ( int  NBin,
int  NSample,
int  Coord 
)
void SlabProf ( int  NBin,
int  nNano,
int  Coord1 
)
void PrintDens ( FILE *  FileToWrite,
double **  Plot,
double *  LatDim,
int  NBin 
)

Print the density profile in the surfaces representation.

a

Definition at line 414 of file ElPolyProfDens.cpp.

References ChooseDraw().

Referenced by BondDistr(), CartDens(), Diff2Files(), RadDistrF(), SlabProf(), and SplayDistr().

void RadDens2Thick ( int  NBin)

Calculate the thickness from the radial density profile.

a

Definition at line 1031 of file ElPolyProfDens.cpp.

References VarData::LoadDensFile(), NFile, and VarData::pEdge().

void RadDens2Thick2d ( int  NBin)

Calculate the thickness from the radial density profile.

a

Definition at line 1090 of file ElPolyProfDens.cpp.

References NFile, VarData::pEdge(), VarData::pInvEdge(), VarData::pNPart(), VarData::pPos(), and VarData::pType().

void CartDens ( int  NBin,
int  nNano 
)
void RadDistrF ( int  NBin,
int  How,
int  nNano 
)
void BondDistr ( int  NSample)
void SplayDistr ( int  NSample)
void ThickFromDens ( int  NBin)

Calculate the thickness profile from the density plot.

a

Definition at line 1128 of file ElPolyProfDens.cpp.

References VarData::CLat1, VarData::CLat2, VarData::pCm(), VarData::pEdge(), VarData::pInvEdge(), VarData::pNPart(), VarData::pPos(), and VarData::pVel().

void StalkLineProfF ( int  NBin)

Write the line describing a linear stalk.

Call the function StalkLineProf to reconstruct the linear shape of the stalk and calculate the power spectrum.

Definition at line 388 of file ElPolyProfile.cpp.

References VarData::CLat1, VarData::CLat2, NFile, VarData::Open(), VarData::pEdge(), VarData::pInvEdge(), Processing(), and VarData::StalkLineProf().

void AreaCompr ( int  NSample)

Calculates the number of chain per area area.

Subdivide the simulation box in SubDiv[CLat1]xSubDiv[CLat2] squares and calculate the average number of chains and its stadard deviation.

The compressibility is in the limit lim_l = l^2<N_c^2>/<N_c>^2 where l is the dimension of the patch and NTimes different patches size are taken in account. It works in NVT.

Definition at line 1146 of file ElPolyMeasure.cpp.

References VarData::CLat1, VarData::CLat2, VarData::NEdge, NFile, VarData::OpenRisk(), VarData::pchiN(), VarData::pChPos(), VarData::pEdge(), VarData::pInvEdge(), VarData::pkappaN(), VarData::pNChain(), VarData::prho(), Processing(), and VarData::SysDef().

void ElasticCoupling ( int  NSample)

Measure the elastic coupling between the two sheets.

Divides the box size in small patches and calculate the thinning for every patch.

For every patch size are stored the mean values and variance of the thickness. As output it is printed the area per patch, the correspondent thickness, the standard deviation and the elastic coupling modulus.

Definition at line 1248 of file ElPolyMeasure.cpp.

References VarData::Ch, VarData::CLat1, VarData::CLat2, VarData::CNorm, NFile, VarData::OpenRisk(), VarData::pChain(), VarData::pchiN(), VarData::pEdge(), VarData::pInvEdge(), VarData::pkappaN(), VarData::pNPart(), VarData::pPos(), VarData::prho(), Processing(), VarData::pType(), VarData::SysDef(), and CHAIN::Type.

Measure the elastic coupling between the two sheets.

Elastic coupling modulus calculation for a fixed box size simulation.

Definition at line 1377 of file ElPolyMeasure.cpp.

References VarData::Ch, VarData::CLat1, VarData::CLat2, VarData::CNorm, NFile, VarData::OpenRisk(), VarData::pChain(), VarData::pchiN(), VarData::pEdge(), VarData::pkappaN(), VarData::pNPart(), VarData::pPos(), VarData::prho(), Processing(), VarData::pType(), and VarData::SysDef().

int CoreF ( int  NBin,
int  How 
)
void FetchStalk ( )

Write the position of the stalk for every snapshot.

Simple Monte Carlo to find the best position and radius of the osculating torus.

Definition at line 596 of file ElPolyRepr.cpp.

References NANO::Area, NANO::Height, VarData::Nano, NFile, VarData::OpenRisk(), VarData::pNanoPos(), Processing(), VarData::pTime(), NANO::Rad, VarData::SetNNano(), StalkArea(), VarData::StalkPos(), and VarData::StringNano().

void StalkArea ( )

Area of hydrophobic in the torus.

Simple Monte Carlo to find the best position and radius of the osculating torus.

The area and position of the torus are hence redifined counting how many hydrophilic beads are inside the torus.

Definition at line 624 of file ElPolyRepr.cpp.

References NANO::Area, VarData::CLat1, VarData::CLat2, VarData::CNorm, VarData::HeaderNano(), NANO::Height, VarData::Nano, NFile, VarData::OpenRisk(), VarData::pCm(), VarData::pEdge(), VarData::pInvEdge(), VarData::pNanoPos(), VarData::pNPart(), NANO::Pos, VarData::pPos(), Processing(), VarData::pTime(), VarData::pType(), NANO::Rad, VarData::SetNanoBkf(), VarData::SetNNano(), VarData::StalkPos(), and VarData::StringNano().

Referenced by FetchPore(), and FetchStalk().

void SlabAngleProfs ( int  NBin,
int  NAngle,
int  Coord 
)

Radial profiles of the slab density between 0⁰ and 90⁰ subdivided in NAngle angles.

a

Definition at line 1170 of file ElPolyProfDens.cpp.

References VarData::CLat1, VarData::CLat2, VarData::CNorm, VarData::pEdge(), VarData::pNPart(), and VarData::pPos().

void ChooseDraw ( char *  String)

Assing the correct value of What2Draw from.

Parameters:
String

Definition at line 315 of file ElPolyEl.cpp.

References What2Draw.

void DrIsolevel ( int  NSample,
double  IsoLevel 
)

Defines the triangles at the boundaries of the density close to the IsoLevel value.

NormalWeight(Tri,WeightL,NSample,NTri);

Definition at line 1104 of file ElPolyDrawSurf.cpp.

References VAR_TRIANGLE::c, Matematica::Casuale(), DrawNano(), IfLine, InvScaleUn, VarData::MarchingCubes(), VarData::Mat, VAR_TRIANGLE::n, Draw::Particles, VarData::pEdge(), VarData::pInvEdge(), VarData::pNNano(), VarData::pNPart(), VarData::pPos(), VarData::pVol(), ScaleFact, VAR_TRIANGLE::v, and XYZ::x.

Referenced by ElMenuVisual().


Member Data Documentation

int IfLine

Boh.

Boh If it draws the bonds

Definition at line 435 of file ElPoly.h.

Referenced by DrawFuncHeader(), DrCrossLinks(), DrIsolevel(), DrPolygon(), DrVectors(), ElMenuChoise(), ElPoly(), and keyboard().

Boh.

Draw output flag

Definition at line 447 of file ElPoly.h.

Referenced by DrawFuncFooter(), DrawFuncHeader(), ElMenuChoise(), and Graphics().

double Vicinanze

Boh.

Boh Boh Distance from the nanoparticle

Definition at line 455 of file ElPoly.h.

Referenced by DrIntorno(), and Graphics().


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