~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/moltemplate/examples/all_atom_examples/nanotube+water/run.in.npt

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# THIS EXAMPLE HAS NOT BEEN RIGOROUSLY TESTED.
2
 
# (This simulation may fail.
3
 
#  However the "run.in.nvt" example in this directory should work.)
4
 
#
5
 
#        Requirements:
6
 
# To run this system at constant pressure, it might help to compile LAMMPS with
7
 
# the optional RIGID package, and use "fix rigid" on the carbon.  (Optional.)
8
 
# The use of fix rigid is controversial.  This method is demonstrated below.
9
 
 
10
 
# ------------------------------- Initialization Section --------------------
11
 
 
12
 
include system.in.init
13
 
 
14
 
# ------------------------------- Atom Definition Section -------------------
15
 
 
16
 
read_data system.data
17
 
 
18
 
# ------------------------------- Settings Section --------------------------
19
 
 
20
 
include system.in.settings
21
 
 
22
 
# ------------------------------- Run Section -------------------------------
23
 
 
24
 
 
25
 
# Only the Cgraphene atoms are immobile.
26
 
group mobile subtract all Cgraphene
27
 
 
28
 
 
29
 
# Unfortunately you can not use the LAMMPS "minimize" command on this system
30
 
# because there is no way to immobilize the carbon graphene & nanotube atoms
31
 
# during minimization.  Instead, we can use langevin dynamics with a large 
32
 
# damping parameter and a small timestep.
33
 
 
34
 
print "--------- beginning minimization (using fix langevin) ---------"
35
 
 
36
 
timestep        0.1
37
 
fix fxlan mobile langevin 1.0 1.0 100.0 48279
38
 
fix fxnve mobile nve   # <-- needed by fix langevin (see lammps documentation)
39
 
thermo          100
40
 
run 2500
41
 
 
42
 
unfix fxlan
43
 
unfix fxnve
44
 
 
45
 
# -- simulation protocol --
46
 
 
47
 
print "--------- beginning simulation (using fix nvt) ---------"
48
 
 
49
 
timestep        0.25
50
 
dump            1 all custom 1000 traj_npt.lammpstrj id mol type x y z ix iy iz
51
 
 
52
 
thermo_style    custom step temp pe etotal press vol epair ebond eangle edihed
53
 
thermo          1000  # time interval for printing out "thermo" data
54
 
 
55
 
 
56
 
 
57
 
 
58
 
 
59
 
# ------------------------- NPT ---------------------------
60
 
 
61
 
# Set temp=300K, pressure=100bar, and equilibrate volume only in the z direction
62
 
 
63
 
fix fxMoveStuff mobile npt temp 300 300 100 z 100 100 1000.0 dilate mobile
64
 
 
65
 
#  ------ QUESTIONABLE (see below): ------
66
 
 
67
 
fix Ffreezestuff Cgraphene rigid/npt single temp 300 300 100 z 100 100 1000.0 force * off off off torque * off off off dilate mobile
68
 
 
69
 
#     -- Alternate npt rigid method --
70
 
# I'm not sure which way is more correct, however 
71
 
# this also seems to behave in a reasonable-looking way:
72
 
#fix Ffreezestuff Cgraphene rigid single force * off off off torque * off off off
73
 
#
74
 
# The use of either "fix rigid" or "fix rigid/npt" to immobilize
75
 
# an object is somewhat controversial.  Feel free to omit it.
76
 
#(Neither Trung or Steve Plimpton use rigid or rigid/npt for immobilizing 
77
 
#molecules, but I noticed that at NPT, it does a better job of maintaining 
78
 
# the correct volume. However "fix rigid" has changed since then (2011), 
79
 
# so this may no longer be true.  Please use this example with caution.)
80
 
#  ----------------------------------------
81
 
 
82
 
# IMPORTANT for NPT: You must use "neigh_modify" to turn off calculation of the
83
 
#                    forces between immobilized atoms.
84
 
neigh_modify exclude group Cgraphene Cgraphene
85
 
 
86
 
# The next two lines recalculate the temperature 
87
 
# using only the mobile degrees of freedom:
88
 
 
89
 
compute tempMobile mobile temp
90
 
compute pressMobile all pressure tempMobile
91
 
 
92
 
thermo_style custom step c_tempMobile c_pressMobile temp press vol
93
 
 
94
 
fix_modify fxMoveStuff temp tempMobile
95
 
 
96
 
run             100000
97
 
 
98
 
write_data  system_after_npt.data
99
 
 
100
 
# (The "write_restart" and "read_restart" commands were buggy in 2012, 
101
 
#  but they should work also.)
102