《周期性边界条件.pptx》由会员分享,可在线阅读,更多相关《周期性边界条件.pptx(29页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Analysis of the Potential EnergyExternal potentialPair potentialabout 90%Three body contributionIn FCC crystal,up to 10%Effective pair potential第1页/共29页1.7.1 Effective pair potential for spherical molecules1.7.1.1 Hard-sphere potentialFor the purposes of investigating general properties of liquids a
2、nd for comparison with theory,highly idealized pair potentials may be of value.In this section,I will introduce hard-sphere,square-well,Yukawa and Lennard-Jones potentials,etc.is the diameter of hard spheres第2页/共29页1.7.1.2 Square-Well potentialSW potential is the simplest one including the attractiv
3、e forces and can be applied toinert gases and some non-polar substances,etc.第3页/共29页1.7.1.3 Yukawa potentialWhen ,it canbe used to model Ar reasonably well.Yukwa potential can also be used to model plasma,colloidal particles,and some electrical interactions.第4页/共29页1.7.1.4 Lennard-Jones potentialFor
4、 argon:第5页/共29页Codes for calculating the total potential V=0.0 DO 100 I=1,N-1 RXI=RX(I)RYI=RY(I)RZI=RZ(I)DO 100 J=I+1,N RXIJ=RXI-RX(J)RYIJ=RYI-RY(J)RZIJ=RZI-RZ(J)RIJSQ=RXIJ*2+RYIJ*2+RZIJ*2 SR2=SIGSQ/RIJSQ SR6=SR2*SR2*SR2 SR12=SR6*2 V=V+SR12-SR6100 CONTINUE V=V*4.0*EPSLONThe coordinate vectors of LJ
5、atoms are stored in three arrays RX(I),RY(I),RZ(I)Calculate第6页/共29页1.7.1.5 Potentials for ionsA simple approach to construct potentials for ions is to supplement one of the above pair potentials with the Coulomb charge-charge interaction:Where X may be HS,SW,LJ.The popular one is:第7页/共29页1.7.2 poten
6、tial for macromoleculesThe energy,V,is a function of the atomic positions,R,of all the atoms in the system,these are usually expressed in term of Cartesian coordinates.The value of the energy is calculated as a sum of internal,or bonded terms,which describe the bonds,angles and bond rotations in a m
7、olecule,and a sum of external or nonbonded terms.These terms account for interactions between nonbonded atoms or atoms separated by 3 or more covalent bonds.第8页/共29页Bonded potentialBond angle-bendBond-strentchTorsion(rotate-along-bond)第9页/共29页Angle-bend potentialThe deviation of angles from their re
8、ference values is frequently described using a Hookes law or harmonic potential:第10页/共29页Bond-stretch potential第11页/共29页Torsion potentialTorsional potentials are almost always expressed as a cosine series expansion.barrier heightDetermines where the torsion angle passes through its minimum value.The
9、 number of minimum points in the function as the bond is rotated through 2.第12页/共29页1.8 Reduced UnitsWhy use reduced unit?Avoids the possible embarrassment of conducting essentially duplicate simulations.And there are also technical advantages in the use of reduced units due to the simulation box is
10、 in the magnitude of molecular scale.Density Temperature Energy Pressure Force Torque Surface tensionTime第13页/共29页Reduced unit-continueDiffusion coefficient ViscosityThermal conductivitySI Units:W/(m K)Pa s m2/sTest of unit(For example,viscosity):第14页/共29页Reduced unit-continueIt should be pointed th
11、at all the reduced units in the previous two slides are based on Lennard-Jones interaction potential.For hard sphere fluid,the reduced units are obtained using kBT to replace.The reduced units for other properties such as chemical potential and heat capacity can be deduced from the units given in th
12、is section.Especially,for electrolyte solution,we can useSurface charge density:第15页/共29页1.9 Simulation Box and Its Boundary Conditions Computer simulations are usually performed on a small number of molecules,10N10,000.The time taken for a double loop used to evaluate the forces and potential energ
13、y is proportional to N 2.Whether or not the cube is surrounded by a containing wall,molecules on the surface will experience quite different forces from molecules in the bulk.It is essential to propose proper methods to overcome the problem of surface effects.第16页/共29页1.9.1 Simulation boxxyzCubeHexa
14、gonal prismxyzExample:DNA simulation第17页/共29页1.9.1 Simulation box-continueTruncated octahedronRhombic dodecahedron第18页/共29页1.9.2 Periodic boundary conditionBAHDGFEC第19页/共29页BAHDGFECIn a cubic box,the cutoff distance is set equal to L/2.Minimum image convention第20页/共29页AEA side view of the box(b)A to
15、p view of the boxBDCAEHFGSimulation of molecules in slit-like pore第21页/共29页1.9.3 Computer code for periodic boundaries How do we handle periodic boundaries and the minimum image convention in a simulation program?Let us assume,initially,the N molecules in the simulation lie with a cubic box of side
16、BOXL,with the origin at its center,i.e.,all coordinate lie in the range(-BOXL/2,BOXL/2).After the molecules have been moved,we must test the position immediately using a FORTRAN IF statement.IF(RX(I).GT.BOXL2)RX(I)=RX(I)-BOXLIF(RX(I).LT.-BOXL2)RX(I)=RX(I)+BOXL第22页/共29页An alternative code for periodi
17、c boundaries An alternative to the IF statement is to use FORTRAN arithmetic functions:RX(I)=RX(I)-BOXL*ANINT(RX(I)/BOXL)The function ANINT(X)returns the nearest integer to X,converting the results back to type REAL.For example,ANINT(-0.49)=0;ANINT(-0.55)=-1 The function ANINT(X)is different from AI
18、NT(X).AINT(X)returns the integral part of X.The use of IF statement inside the inner loop,particularly on pipeline machines,is to be avoided.第23页/共29页1.9.4 Computer code for minimum image conventionImmediately after calculating a pair separation vector,we apply the code similar to the periodic bound
19、ary adjustments.RXIJ=RXIJ-BOXL*ANINT(RXIJ/BOXL)RYIJ=RYIJ-BOXL*ANINT(RYIJ/BOXL)RZIJ=RZIJ-BOXL*ANINT(RZIJ/BOXL)If we use a FORTRAN variable RCUTSQ to represent the square of cutoff distance rc.After the above codes,the following statements would be employed:第24页/共29页RIJSQ=RXIJ*2+RYIJ*2+RZIJ*2 IF(RIJSQ
20、.LT.RCUTSQ)THEN compute i-j interaction accumulate energy and force.ENDIFRIJSQ=RXIJ*2+RYIJ*2+RZIJ*2RIJSQI=1.0/RIJSQRIJSQI=CVMGP(RIJSQI,0.0,RCUTSQ-RIJSQ)compute I-j interaction .as a functions of RIJSQI.recommended第25页/共29页The function CVMGP(A,B,C)is a vector merge statement which returns to the valu
21、e A if C is non-negative and the value B otherwise.For example:CVMGP(9,0,0)=9 CVMGP(9,8,2)=9 CVMGP(9,8,-1)=8The computer code for other shapes of simulation boxes can be found in program F1.第26页/共29页1.9.5 Non-periodic boundary methodsPeriodic boundary conditions are not always used in computer simul
22、ation.Why?Some systems,such as liquid droplets or van der Waals clusters,inherently contain a boundary.When simulating inhomongeneous systems or systems that are not at equilibrium,periodic boundary conditions may cause difficulties.In the study of the structural and conformational behavior of macro
23、molecules such as proteins and protein-ligand complexes,the use of periodic boundary conditions would require a prohibitive number of atoms to be included in the simulation.第27页/共29页Example for non-periodic boundary conditions-study the active site of an enzyme Reaction zone:r R1.Containing atoms or group with the site of interest.Perform full simulation.Reservoir region:R1rR2,discarded or fixed.Division into reaction zone and reservoir regions in a simulation第28页/共29页感谢您的观看。第29页/共29页
限制150内