Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
d1356c1d
Commit
d1356c1d
authored
7 years ago
by
Aidan Thompson
Browse files
Options
Downloads
Patches
Plain Diff
Made ndof dynamic for temperature fixes and computes
parent
0bfb6f0c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/gcmc/in.gcmc.co2
+6
-1
6 additions, 1 deletion
examples/gcmc/in.gcmc.co2
examples/gcmc/in.gcmc.h2o
+9
-6
9 additions, 6 deletions
examples/gcmc/in.gcmc.h2o
src/MC/fix_gcmc.cpp
+8
-0
8 additions, 0 deletions
src/MC/fix_gcmc.cpp
with
23 additions
and
7 deletions
examples/gcmc/in.gcmc.co2
+
6
−
1
View file @
d1356c1d
...
...
@@ -59,7 +59,9 @@ timestep 1.0
# rigid constraints with thermostat
fix myrigidnvt co2 rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
fix_modify myrigidnvt dynamic/dof no
# dynamically update fix rigid/nvt/small temperature ndof
fix_modify myrigidnvt dynamic/dof yes
# gcmc
...
...
@@ -82,7 +84,10 @@ variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
# dynamically update default temperature ndof
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
thermo 1000
...
...
This diff is collapsed.
Click to expand it.
examples/gcmc/in.gcmc.h2o
+
9
−
6
View file @
d1356c1d
...
...
@@ -30,8 +30,6 @@ create_box 2 box &
extra/angle/per/atom 1 &
extra/special/per/atom 2
# we can load multiple molecule templates, but don't have to use them all
molecule co2mol CO2.txt
molecule h2omol H2O.txt
create_atoms 0 box mol h2omol 464563 units box
...
...
@@ -58,15 +56,21 @@ timestep 1.0
minimize 0.0 0.0 100 1000
reset_timestep 0
# rigid constraints with thermostat
fix mynvt all nvt temp ${temp} ${temp} 100
fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol
# gcmc
fix mynvt h2o nvt temp ${temp} ${temp} 100
fix wshake h2o shake 0.0001 50 0 b 1 a 1 mol h2omol
# important to make temperature dofs dynamic
compute_modify thermo_temp dynamic/dof yes
compute_modify mynvt_temp dynamic/dof yes
run 1000
reset_timestep 0
# gcmc
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol &
...
...
@@ -87,7 +91,6 @@ variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc v_nO v_nH
thermo 1000
...
...
This diff is collapsed.
Click to expand it.
src/MC/fix_gcmc.cpp
+
8
−
0
View file @
d1356c1d
...
...
@@ -1253,6 +1253,10 @@ void FixGCMC::attempt_molecule_deletion()
if
(
ngas
==
0
)
return
;
// work-around to avoid n=0 problem with fix rigid/nvt/small
if
(
ngas
==
natoms_per_molecule
)
return
;
tagint
deletion_molecule
=
pick_random_gas_molecule
();
if
(
deletion_molecule
==
-
1
)
return
;
...
...
@@ -1910,6 +1914,10 @@ void FixGCMC::attempt_molecule_deletion_full()
if
(
ngas
==
0
)
return
;
// work-around to avoid n=0 problem with fix rigid/nvt/small
if
(
ngas
==
natoms_per_molecule
)
return
;
tagint
deletion_molecule
=
pick_random_gas_molecule
();
if
(
deletion_molecule
==
-
1
)
return
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment