Skip to content

Commit

Permalink
Add a MC NPT test with electrostatics
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Fraux committed Sep 18, 2018
1 parent a9706a2 commit 6878bdf
Show file tree
Hide file tree
Showing 9 changed files with 863 additions and 153 deletions.
125 changes: 0 additions & 125 deletions examples/mc_npt_spce.rs

This file was deleted.

13 changes: 6 additions & 7 deletions tests/data/mc-water/ewald.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@
version = 1

[global]
cutoff = "9 A"
cutoff = "6 A"
tail_correction = true

# f-SPC model of water, using ewald summation for electrostatics
[[pairs]]
atoms = ["O", "O"]
lj = {sigma = "3.16 A", epsilon = "0.155 kcal/mol"}

[[pairs]]
atoms = ["H", "H"]
harmonic = {k = "79.8 kcal/mol/A^2", x0 = "1.633 A"}
restriction = "IntraMolecular"
null = {}

[[pairs]]
atoms = ["H", "O"]
null = {}

[[bonds]]
atoms = ["O", "H"]
harmonic = {k = "1054.2 kcal/mol/A^2", x0 = "1.0 A"}
null = {}

[[angles]]
atoms = ["H", "O", "H"]
harmonic = {k = "75.9 kcal/mol/rad^2", x0 = "109.5 deg"}
null = {}

[coulomb]
ewald = {cutoff = "8.5 A", kmax = 8}
ewald = {cutoff = "6 A", accuracy = 1e-5}
restriction = "inter-molecular"

[charges]
Expand Down
18 changes: 18 additions & 0 deletions tests/data/mc-water/npt-ewald.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[input]
version = 1

[[systems]]
file = "water.pdb"
potentials = "ewald.toml"

[[simulations]]
nsteps = 10_000

[simulations.propagator]
type = "MonteCarlo"
temperature = "300 K"
moves = [
{type = "Translate", delta = "0.3 A", frequency = 50},
{type = "Rotate", delta = "20 deg", frequency = 50},
{type = "Resize", pressure = "1000 bar", delta = "100 A^3", frequency = 1},
]
18 changes: 18 additions & 0 deletions tests/data/mc-water/npt-wolf.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[input]
version = 1

[[systems]]
file = "water.pdb"
potentials = "wolf.toml"

[[simulations]]
nsteps = 10_000

[simulations.propagator]
type = "MonteCarlo"
temperature = "300 K"
moves = [
{type = "Translate", delta = "0.3 A", frequency = 50},
{type = "Rotate", delta = "20 deg", frequency = 50},
{type = "Resize", pressure = "1000 bar", delta = "100 A^3", frequency = 1},
]
10 changes: 4 additions & 6 deletions tests/data/mc-water/nvt-ewald.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
version = 1

[[systems]]
file = "water.xyz"
cell = 18
guess_bonds = true
file = "water.pdb"
potentials = "ewald.toml"


[[simulations]]
nsteps = 5_000

[simulations.propagator]
type = "MonteCarlo"
temperature = "300 K"
moves = [
{type = "Translate", delta = "3 A", frequency = 1},
{type = "Rotate", delta = "20 deg", frequency = 1},
# WHAAAT ? The deltas are way too low ...
{type = "Translate", delta = "0.1 A", frequency = 1},
{type = "Rotate", delta = "10 deg", frequency = 1},
]
9 changes: 3 additions & 6 deletions tests/data/mc-water/nvt-wolf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@
version = 1

[[systems]]
file = "water.xyz"
cell = 18
guess_bonds = true
file = "water.pdb"
potentials = "wolf.toml"


[[simulations]]
nsteps = 5_000

[simulations.propagator]
type = "MonteCarlo"
temperature = "300 K"
moves = [
{type = "Translate", delta = "3 A", frequency = 1},
{type = "Rotate", delta = "20 deg", frequency = 1},
{type = "Translate", delta = "1 A", frequency = 1},
{type = "Rotate", delta = "120 deg", frequency = 1},
]
Loading

0 comments on commit 6878bdf

Please sign in to comment.