📄 cavity.xm
字号:
######################################################################## 17 Jul 96 ## ## Example: Constraining particle with the CONSTRAIN CAVITY command ## ######################################################################### ## The CONSTRAIN CAVITY command creates a cavity constraint which ## imposes a spring-like force on atoms that try to exit through the ## wall. ## ## In this example, we create a single Ni FCC 3.5x3.5x3.5 cube. ## This cube is started with its atoms at 16000K and its is placed ## in an ellipsoidal cavity. Molecular dynamics is performed for ## 2000 steps, during which time atoms 'boil' off the cube into ## space and are reflected back by the ellipsoid walls. ## ## A COR file cavity.cor is written so that a movie can be made. ## Also an ESAVE file cavity.e is written to every 10 steps to check ## that energy is conserved. ## ######################################################################### The format of the CONSTRAIN CAVITY command is ## ## CONSTRAIN ELLIPSOID spring xc yc zc xa ya za ## or ## CONSTRAIN SPHERE spring xc yc zc radius ## ## where spring is the spring constant (dynes/cm) ## xc yc zc is the center of the cavity (angstroms) ## xa ya za are the ellipsoidal half-axises (angstroms) ## (analogous to spherical radii) ## radius is the sphere radius (angstroms) ## ########################################################################## Read Nickel-Aluminum potential#read ../nial.txt## Set large box (most of box will be empty)#box 12 12 12## Create a 3.5x3.5x3.5 FCC cube with one corner at the origin#particle 41 0.25 0.25 0.251 0.25 0.75 0.751 0.75 0.25 0.751 0.75 0.75 0.25dup 4 1 0 0 dup 4 0 1 0 dup 4 0 0 1 ## Trim off remaining 0.5 cells## NOTE: This leaves 'extra' layer on trailing surfaces,# so that every surface atom is one of the fcc unit cell# 'corners'. The result is the cube looks more symetrical.#select not box 0 0 0 3.5 3.5 3.5remove## Move cube toward center of box#select allmove 4.25 4.25 4.25## Add ellipsoid cavity#constrain cavity sphere 1e5 6.0 6.0 6.0 4.0 2.0 2.0## Scale up to Ni unit cell length#scale 3.52## Set masses#select all# MASS1 is set in nialh.txt filemass MASS1## Set adiabatic simulation (total energy conserved) #clamp -1## Initialize high temperature#itemp 16000## Save energy every 10 time steps (to check conservation of energy)#esave 10 cavity.e## Write initial coordinates (for make movie after)#write cor cavity.cor## Perform 2000 simulations steps # Save coordinates after every 20 steps#repeat 100 cmd 20 write cor +cavity.corend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -