-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathncl.in
175 lines (129 loc) · 3.99 KB
/
ncl.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#----------------------------------Initialization-----------------------------------
variable Ocount loop 3
variable wO index 0.02 0.06 0.1
label Ichange
variable Icount loop 3
variable wI index 1.0 0.5 0.1
shell mkdir wettability_wO_${wO}_wI_${wI}
shell cd wettability_wO_${wO}_wI_${wI}
label fchange
variable fcount loop 18
variable f index 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 #Percentage of hydrophilic area
log log_ncl_$f.txt
#processors * * * grid numa
#package intel 0 omp 1
units metal
dimension 3
boundary p f p
atom_style atomic
variable t equal 100
variable h equal 5.00
#variable wI equal 1.0
#variable wO equal 0.02
variable l equal 10.5
variable fI equal $f #Percentage of hydrophilic area
variable volume equal $(v_l*v_l*(v_h+1)*5.85*5.85*5.85)
#---------------------------------System Definition---------------------------------
#Simulation Box
lattice fcc 5.85
region box block -0.25 10.5 -1 $(v_h+3.0) 0 10.5
create_box 3 box
#Set up atoms
region B block 0 INF 1.0 $(v_h+1.0) 0 INF
region A1 block 0 INF -0.5 0.5 0 INF
region A2 block 0 INF $(v_h+1.51) $(v_h+2.5) 0 INF
region A1I block 0 $(v_f*v_l) -0.5 0.5 0 INF
region A1O block $(v_f*v_l) INF -0.5 0.5 0 INF
region A2I block 0 $(v_f*v_l) $(v_h+1.51) $(v_h+2.5) 0 INF
region A2O block $(v_f*v_l) INF $(v_h+1.51) $(v_h+2.5) 0 INF
region fluid block 0 INF 0.5 $(v_h+1.5) 0 INF
create_atoms 1 region B
lattice fcc 3.615
create_atoms 2 region A1I
create_atoms 2 region A2I
create_atoms 3 region A1O
create_atoms 3 region A2O
group ar type 1
group cuI type 2 #hydrophIllic
group cuO type 3 #hydrophObic
group cu union cuI cuO
mass 1 39.95
mass 2 63.55
mass 3 63.55
velocity all create $t 4928459
#---------------------------------Simulation Settings---------------------------------------
#force field
pair_style lj/cut 8.5
pair_coeff 1 1 0.0103 3.405 8.5
pair_coeff 2 2 0.41148 2.34 6.5
pair_coeff 3 3 0.41148 2.34 6.5
pair_coeff 2 3 0.41148 2.34 6.5
pair_coeff 1 2 $(v_wI*0.06489) 2.872 11.9
pair_coeff 1 3 $(v_wO*0.06489) 2.872 11.9
neighbor 0.35 bin
neigh_modify delay 1
#settings
timestep 0.005
#Apply fix
fix 1 cu spring/self 4.3
shell mkdir trajectory_ncl_$f
shell cd trajectory_ncl_$f
fix 2 ar nvt temp $t $t $(10*dt)
fix myfix cu nvt temp $t $t $(10*dt)
thermo 100
thermo_modify lost ignore
#dump 1 all custom 100 tarj.all_atom.*.txt id type x y z
dump 1 all atom 1000 traj_all_atom_*.txt
run 3000
shell cd ..
undump 1
compute arTemp ar temp
compute cuTemp cu temp
thermo 1000
thermo_style custom step temp c_arTemp c_cuTemp etotal press
run 1500000
write_data pp_data_ncl_$f.txt
write_restart pp_restart_ncl_$f.bin
#output
#Energy Calculation
compute pe ar pe/atom
compute PE ar reduce sum c_pe
compute KE ar ke
variable E equal c_PE+c_KE
variable Esq equal v_E*v_E
variable KEsq equal c_KE*c_KE
variable PEsq equal c_PE*c_PE
variable N equal count(ar)
#MSD
compute arMSD ar msd
fix MSD ar ave/time 100 1 100 c_arMSD[1] c_arMSD[2] c_arMSD[3] c_arMSD[4] file msd_ar_ncl_$f.txt
#RDF
compute arRDF ar rdf 500 1 1
fix RDF ar ave/time 1000 1 1000 c_arRDF[*] file rdf_ar_ncl_$f.txt mode vector
#Pressure
compute peratomS ar stress/atom arTemp
compute stress ar reduce sum c_peratomS[1] c_peratomS[2] c_peratomS[3]
variable arPress equal -(c_stress[1]+c_stress[2]+c_stress[3])/(3*v_volume)
fix 5 ar ave/time 2 500 1000 v_N v_fI c_arTemp v_arPress v_Esq v_E c_PE v_PEsq c_KE v_KEsq file cv_data_ncl_$f.txt
#Density Profile
#compute allChunk all chunk/atom bin/3d x lower INF y lower 5.85 z lower INF
compute arChunk all chunk/atom bin/1d y lower 0.01 region fluid units reduced
fix arDensity all ave/chunk 2 500 1000 arChunk density/mass density/number file ardensity_ncl_$f.txt
thermo 1000
thermo_style custom step f_5[*]
run 100000
unfix MSD
unfix RDF
unfix arDensity
run 1500000
clear
next f
next fcount
jump SELF fchange
shell cd ..
next wI
next Icount
jump SELF Ichange
next wO
next Ocount
jump SELF