Melting point of a model of NaCl - e-nano

Melting point of a model of NaCl
1/21
sw2/1
Aim:
Determine the melting point of a model of NaCl by the zone melting method
Model:
Lennard Jones + charges∗
Tasks:
prepare a nanocrystal 2 × 2 × 2 by optimization (minimization of energy)
of cluster Na4Cl4 in vacuum
replicate this motif 3 × 3 × 3 times and simulate the crystal Na108Cl108
in periodic boundary conditions
determine the density, radial distribution function, and running coordination numbers
melt and analyze the same quantities
replicate crystal Na108Cl108 1 × 1 × 3 times and melt half of the box
simulate at given temperature and determine whether the crystal melts
or grows
∗
In Suk Joung and Thomas E. Cheatham, III: Determination of Alkali and Halide Monovalent Ion Parameters for Use in Explicitly Solvated Biomolecular Simulations, J. Phys.
Chem. B 112, 90209041 (2008)
Technical info VERSION 1 / CygWin TUL
Software MACSIMUS works under linux. It is possible
to run it in Windows using CygWin.
Steps:
turn on the teminal and login to LIANE
click Remote Desktop
run the Cygwin emulator, type the following command
sh-4.1# startx -- :#
where # is a unique number in the range 0–15, and press Enter
linux is case sensitive!
spaces are important – do not omit them
US keyboar setup (recommended):
sh-4.1# setxkbmap us
2/21
sw2/1
3/21
sw2/1
Technical info VERSION 2 / notebook hotspot
To connect, you need:
PuTTY – use Google to find, download putty.exe
XMing – use Google to find, install using the installer
WiFi hotspot:
Network = a325-nb
Password: 756f3c8fe6
Start the terminal (putty.exe):
Start the X-server (XMing)
Host name = 10.42.0.1
XMing.exe or XLaunch.exe
Connection → SSH
[→ Tunneling] → X11
→ x Enable X11 forwarding
At the status bar:
present
back to Session → Open
Login as: guest
Password: I will tell you
(no response during typing)
must be
Test of connection
4/21
sw2/1
Work in linux/unix is based on writing commands to a command interpreter
called a shell; the command is executed after Enter is pushed.
The line start (e.g., sh-4.1# ) is called prompt.
A window with a prompt and command interpreter is a terminal.
To fix/repeat previous command(s), use cursor arrows.
Test of connection:
sh-4.1# xclock
A clock should appear. Kill it by clicking × , or by Ctrl-C in the terminal.
NOTE: Ctrl-C in a terminal = interrupt, not Copy!
Do not see a clock?
It may be iconized, look at the bottom bar.
Have you selected X11 forwarding in PuTTY?
Can you see icon
at the status bar?
Restart PuTTY and/or Xming.
Restart Windows...
Midnight Commander
5/21
sw2/1
Midnight Commander is similar to Windows or Total Commander. Start:
sh-4.1# mc
E.g., a new folder is created using F7
Both mouse and keyboard shortcuts are accepted
Most important keys:
Ctrl-O toggle screen output / file list panels
F3 View text file (or run associated application)
F4 Edit text file (= mcedit FILE from the command prompt)
F10 End (function, editor, Midnight Commanderu. . . )
There is also a mc command prompt, only the text output of running commands is hidden (use Ctrl-O to view)
To get the history of commands, click [^] bottom right, or type Alt-H
Linux command prompt
6/21
sw2/1
The standard linux workstyle is based on command prompt, running a command interpreter (usually bash), also called a shell or a terminal.
exit
logout (also Ctrl-D )
cd FOLDER
change directory (folder)
cd ..
parent directory (back one level)
cd -
previous directory
cd
home directory
ls
list files
ls -l a*.g
list details selected files
cat FILE
print (a short ASCII) file
history
show previous commands
rm FILE
remove file (cannot be recovered!)
cp FILE NEWFILE
copy file
cp FILE DIRECTORY
copy file
mv FILE NEWFILE
rename file
mv FILE DIRECTORY
move filee
To correct a misspelled command, use cursor up.
More...
7/21
sw2/1
If the terminal gets covered by text (and no program is runing), type
Enter ; it it does not help, type reset Enter
Ctrl-C in the terminal is not “Copy”, but it interrupts the runing program. (Copy is Ctrl-Shift-C , Paste = Ctrl-Shift-V )
In the native X environment, a marked text is pasted by the middle
mouse button (a wheel)
The PuTTY default paste is the right button (can be changed)
Start / VERSION 1
8/21
sw2/1
Create a folder (subdirectory), e.g., nacl:
sh-4.1# mkdir nacl
From mc, use F7 of File → Mkdir
Use this subdirectory as your “working directory”:
sh-4.1# cd nacl
From mc, just click the folder name
Fool-proof test:
sh-4.1# pwd
Should write something like /cygdrive/jan.hus/nacl/
Unzip the archive with all necessary files to your working directory by:
sh-4.1# unzip PATH-TO-FILE/simcvic.zip
The workout is divided to several scripts (sequences of commands). You
will just run them, either from mc, or from the command prompt:
sh-4.1# A01-Na4Cl4.sh
To speed up, you can use Tab to complete the command, e.g.:
sh-4.1# A01 Tab
Start / VERSION 2
9/21
sw2/1
Type A.sh Enter in the terminal – it will ask you for the name
Type mc Enter and find the folder you have created in the previous step
Type A01-Na4Cl4.sh, etc.
A01-Na4Cl4.sh Nanocrystal
10/21
sw2/1
Force field description nacl.ble will be generated na4cl4.che:
from the force field parameter file sea.par and Na4Cl4
the molecule input file (right)
parameter set=sea
NAp1 NAp1 NAp1 NAp1
MM program blend will be started
Tasks:
study various clusters
prepare a nanocrystal 2 × 2 × 2
place it parallelly to the axes
CLn1 CLn1 CLn1 CLn1
11/21
sw2/1
blend detailed instructions
an atom is marked by leftclicking its center
one atom is unmarked by rightclicking its center
all atoms are unmarked by hot key u or from
the menu Unmark
left mouse rotates, middle mouse moves, right mouse z-rotates + scales
the configuration, wheel scales – try it!
key m = Move marked will apply the above moves to the selection
only, it is is cancelled by m = Move marked again
combine moves and rotations and minimization ( , =
obtain a nanocrystal 2 × 2 × 2
rotate it parallelly to the axes; grid ( = =
Minimize ) to
) may help
save by . = Go (or Save + Quit )
File named na4cl4.plb should be created. Check by clicking (in mc), or by:
sh-4.1# show na4cl4
12/21
sw2/1
blend – more options
hot keys (see also the control panel):
? help
Ctrl-S save
. save+quit
ESC interrupt
= show grid by 1 Å
1 to 4 display mode
Home End perspective
r R size of atoms
m toggle whole molecule / marked atoms (for moves)
u unmark all
labeling: i ID t type n number q charge
SPACE cancel labeling
E calculate energy etc.
, continue minimization (optimization)
: random perturbation + minimization
ctrl-C kill
A02-repl.sh (prepare Na108Cl108)
13/21
sw2/1
A force field description will be selected from the general parameter file
The nanocrystal 2 × 2 × 2 will be replicated 3× in all directions
A short simulation at 300 K and 1 atm follows
If your nanocrystal is wrong or rotated, the simulation will crash, or you
will get a liquid or glass. If this happens, run cheat-A01.sh and repeat.
The file with simulation parameters follows
14/21
sw2/1
nacl300.def
n=108
N[0]=n N[1]=n
! auxiliary variable
! # of Na+ a Cl-
rho=2100
! reference density [kg/m3]
cutoff=8.4
LJcutoff=cutoff
rdf.grid=20
el.epsk=2 el.epsr=0.4
el.diff=0.3
noint=30 h=0.1/noint
no=100
dt.plb=1
!
!
!
!
!
!
!
!
thermostat="Andersen"
T=300
tau.T=1
! random Maxwell-Boltzmann hits
! temperature [K]
! thermostat time constant [ps]
elst cutoff [A]
LJ cutoff
[A]
for structure measurements (RDF)
elst. forces accuracy [K/A]
(suppresses some accuracy warnings)
# of MD steps/cycle and timestep [ps]
# of cycles
write "playback" by [ps]
P=101325
! pressure [Pa]
bulkmodulus=2e13/(T+300)! elastic modulus (for barostat) [Pa]
tau.P=2
! barostat time constant [ps]
init="start"
! start from the previous config,
! new measurement and record
load.n[0]=3
load.n[1]=3
load.n[2]=3
;
!
!
!
!
replicate 3x in x
replicate 3x in y
replicate 3x in z
end of data
View trajectory – program show
15/21
sw2/1
After script A02-repl.sh has finished, a playback show is started:
Mouse is the same as for blend. Selected functions:
panel/button
keyboard
Function
Display mode
g G
balls(and stick), wire...
Playback/ | >
i
play from start
Playback/ | <<
,
start
Playback/ >> |
,
end
Misc/Projections
=
parallel ↔ central (perspective)
Misc/StdRot
Tab
parallel to axes
Save
Ctrl-s
(do not use)
If you are bored:
use N + o to export data for raytracer,
rendering is started from mc by clicking the .nff-file
A03-cr-ini.sh (initial relaxation)
16/21
sw2/1
The script will ask for a temperature, use one from [1200,1400]
(The same temperature will be needed in step A09).
(simulation)
Watch the convergence profile shown for temperature, potential energy,
and density.
Hint: middleclick to close a plot; also Esc , Alt-F4 , × .
Repeat this step if not equilibrated enough!
The density is slowly convergent, fluctuation ± 10 kg m−3 is acceptable.
A04-cr-sim.sh equilibrium simulation
17/21
sw2/1
If equilibrated, a productive run may start
Start the Na108Cl108 periodic crystal simulation once more
(NB: as a job on some systems)
(wait for the results)
A05-cr-view.sh view the results
1=show trajectory
2=convergence profiles
3=RDF: rightclick anywhere in the plot = show color coding
4=running coordination number
Question: What is the coordination number of sodium around chlorine?
A06-melt-ini.sh crystal fusing
18/21
sw2/1
Temperature is 1900 K.
Watch the convergence profiles and repeat if not equilibrated
A07-melt-sim.sh molten salt simulation
Productive run
(NB: as a job on some systems)
A08-melt-view.sh view the results
The same as for the crystal.
Question: How the coordination number of sodium around chlorine has
changed?
(Steps A06–A08 can be skipped, you can continue by A09.)
A09-zone-ini.sh zone melting preparation
19/21
sw2/1
The crystal of steps A03 to A05 will be replicated 3× in the z-direction
and also slightly stretched in this direction
A special thermostat heating the middle part of the box and cooling the
ends will be set up. Thus, we get two slabs, one molten and one with
the original crystal.
The x- and y- sizes of the box are kept constant, as determined by the
previous crystal simulation.
(NB: as a job on some systems)
Hint: the structure is best seen using the parallel projection (Misc/Projections
or = ) and smaller atoms (Ball size or r ).
A10-zone-sim.sh zone melting
20/21
sw2/1
The above configuration will be simulated at constant temperature and
constant z-component of the pressure tensor, Pzz. The x,y sizes are fixed.
(NB: as a job on some systems)
A11-zone-show.sh view the trajectory
The trajectory of the running simulation can be viewed.
Observe whether the crystal grows or melts!
Appendix: MACSIMUS file types
21/21
sw2/1
Some MACSIMUS file types and associated applications in Midnight Commander and command start
type contents
application action
.che
blend
edit, optimize from start (F3=vibrations)
.mol mol. topology
blend
edit, optimize
.plb
trajectory
show
show (and edit) trajectory
.cp
convergence profile showcp
show graphs
.cfg
configuration
showcfg
show configuration
.sta
statistics
staprt
averages, errors, etc. (F3=detailed)
.rdf
pair histograms
rdfg
show RDF (F3=running coord. #)
.g
RDF
plot
show RDF
.cn
running coord. #
plot
plot running coordination number
.def
default parameters
go
run the 1st line
.get
simulation param.
go
run the 1st line
.nff
scene data
ray
raytrace and show
chemical formula