Skip to content

Instantly share code, notes, and snippets.

@Luthaf
Created March 25, 2016 23:13
Show Gist options
  • Save Luthaf/abea51dd0430d3cbf801 to your computer and use it in GitHub Desktop.
Save Luthaf/abea51dd0430d3cbf801 to your computer and use it in GitHub Desktop.
TOML input files
[input]
### Input file version
version = 1.0
### ======================================================================== ###
### Systems ###
### ======================================================================== ###
[[systems]]
### Read everything (positions, velocities, cell and topology) from this file
file = "filename.tng"
### If the cell is missing (XYZ file)
cell = 20 # Cubic cell
# cell = [10, 20, 30] # Orthorombic cell
# cell = [10, 20, 30, 90, 80, 110] # Triclinic cell
### Specify initial positions
positions = "initial.xyz"
### If the topology is missing (XTC files)
topology = "initial.pdb"
### Should we guess bonds?
guess_bonds = true
### Initialize velocities at this temperature
velocities = {init = "300 K"}
### Read initial velocities from the **positions** in the given file
# velocities = {file = "velocities.xyz"}
### ======================================================================== ###
### Read interaction potential from this TOML file
# potentials = "potentials.toml"
### Or specify them directly
[[systems.potentials.pairs]]
atoms = ["O", "Na"]
type = "LennardJones"
sigma = "4.0 A"
epsilon = "0.212 kJ/mol"
[[systems.potentials.bonds]]
atoms = ["O", "H"]
type = "Harmonic"
x0 = "3.4 A"
k = "1545 kJ/mol/A^2"
### Or mix and match with existing force-fields
potentials = {forcefield = "CHARMM-98", additional = "potentials.toml"}
### ======================================================================== ###
### Simulations ###
### ======================================================================== ###
[[simulations]]
### By default, the simulations apply to the first system
systems = [0]
### Run the same simulation in parrallel on all these systems
systems = [0, 1, 2, 3, 4]
### Number of steps for the simulation
nsteps = 1000000
### Outputs of the simulation
outputs = [
{type = "Trajectory", file = "filename.pdb", frequency = 100},
{type = "Energy", file = "energy.dat", screen = true, frequency = 200}
]
### Simulation propagator informations
[[simulations.propagator]]
type = "MolecularDynamics"
timestep = "1 fs"
thermostat = {type = "Berendsen", temperature = "400 K", timestep = "1000 fs"}
[input]
version = 1.0
[[systems]]
cell = 20 # Cubic cell
positions = "initial.xyz"
velocities = {init = "300 K"}
potentials = "potentials.toml"
[[simulations]]
nsteps = 1000000
outputs = [
{type = "Trajectory", file = "filename.pdb", frequency = 100},
{type = "Energy", file = "energy.dat", screen = true, frequency = 200}
]
[[simulations.propagator]]
type = "MolecularDynamics"
timestep = "1 fs"
thermostat = {type = "Berendsen", temperature = "400 K", timestep = "1000 fs"}
[input]
version = 1.0
[[systems]]
file = "filename.tng"
guess_bonds = true
[[simulations]]
nsteps = 10_000_000
outputs = [
{type = "Trajectory", file = "filename.xyz", frequency = 100},
{type = "Properties", file = "averages.dat", frequency = 100}
]
[[simulations.propagator]]
type = "MonteCarlo"
temperature = "500 K"
moves = [
{type = "Translate", delta = "1 A", proba = 50},
{type = "Rotate", delta = "20 deg", proba = 50},
{type = "Resize", proba = 1},
]
[input]
version = 1.0
[[systems]]
cell = [30, 33, 25]
positions = "initial.xyz"
velocities = {init = "300 K"}
potentials = "potentials.toml"
# Start with a minimization
[[simulations]]
[[simulations.propagator]]
type = "GradientDescent"
tolerance = {force = 1e-5, energy = 1e-5}
# And then an NPT molecular dynamics
[[simulations]]
nsteps = 1000000
outputs = [
{type = "Trajectory", file = "filename.pdb", frequency = 100},
{type = "Energy", file = "energy.dat", screen = true, frequency = 200}
]
[[simulations.propagator]]
type = "MolecularDynamics"
timestep = "1 fs"
integrator = {type = "BerendsenBarostat", pressure = "100 bar", timestep = "10000 fs"}
thermostat = {type = "Berendsen", temperature = "400 K", timestep = "1000 fs"}
[input]
version = 1.0
[[systems]]
cell = 30
positions = "dense.xyz"
potentials = "potentials.toml"
[[systems]]
cell = 40
positions = "empty.xyz"
potentials = "potentials.toml"
[[simulations]]
nsteps = 10_000_000
[[simulations.propagator]]
type = "MonteCarlo"
temperature = "500 K"
moves = [
{type = "Translate", delta = "1 A", proba = 1},
{type = "Rotate", delta = "20 deg", proba = 1},
{type = "Exchange", systems = [0, 1], proba = 1},
]
[input]
type = "potentials"
version = 1.0
[[pairs]]
atoms = ["O", "O"]
type = "LennardJones"
sigma = "3.4 A"
epsilon = "0.155 kJ/mol"
# Each section can be precised more than once
[[pairs]]
atoms = ["O", "Na"]
type = "LennardJones"
sigma = "4.0 A"
epsilon = "0.212 kJ/mol"
[[bonds]]
atoms = ["O", "H"]
type = "Harmonic"
x0 = "3.4 A"
k = "1545 kJ/mol/A^2"
[[angles]]
atoms = ["H", "O", "H"]
type = "Harmonic"
x0 = "120 deg"
k = "75 kJ/mol/rad^2"
[coulomb]
type = "Wolf"
cutoff = "12 A"
[coulomb.charges]
Na = 1.0
Cl = -1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment