Jumos.jl icon indicating copy to clipboard operation
Jumos.jl copied to clipboard

Input files for simulations and potentials

Open Luthaf opened this issue 9 years ago • 0 comments

Having input files with a nice syntax would be great. The YAML format seems to be a good format for this, and there is already a Julia parser. This can be a syntax example :

simulation:
    type: MolecularDynamic
    integrator:
        type: Verlet
        timestep: 1.0
    forces:
        # TODO
    controls:
        - type: BerendsenThermostat
          coupling: 100
          temperature: 450
        - type: BerendsenBarostat
          coupling: 100
          pressure: 1.4
    outputs:
        - type: TrajectoryOutput
          frequency: 10
          file: output.xyz
        - type: EnergyOutput
          frequency: 50
          file: Energy.dat
potentials:
    from_file: ../potentials.yml
initial_setup:
    cell: [10.0, 10.0, 10.0]
    # cell: {type: orthorombic, size: [10.0]}
    positions: initial.xyz
    velocities: # if needed
    topology: # if needed

The file potentials.yml looks like this :

pairs:
    - atoms: [He, He]
      type: LennardJones
      sigma: 3.4
      epsilon: 0.45
    - atoms: [*, *]  # Default values
      type: LennardJones
      sigma: 2.5
      epsilon: 0.8
      cutoff: 8.5
angles:
    - atoms: [He, Ar, Xe]
      form: HarmonicAngles
      k: 67
      theta0: 120

The implementation could build and bind the corresponding types at runtime.

Luthaf avatar Jan 24 '15 18:01 Luthaf