lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
43 stars 28 forks source link

observable_file input option #18

Closed zoombya closed 2 years ago

zoombya commented 2 years ago

Add an observable_file option to the oxDNA input file to have a way of storing observables, and exchanging \ building them with 3d party tools like ox-view.

lorenzo-rovigatti commented 2 years ago

Commit 1c065cbc6474c361a6ab8a1c6b8fab5bf04fddc6 adds a new observables_file option that can be used to specify a JSON file containing additional outputs. Here is an example:

{
  "output_1" : {
    "print_every" : "10000",
    "name" : "hb_energy.dat",
    "cols" : [
      {
        "type" : "step",
        "units" : "MD"
      },
      {
        "type" : "hb_energy"
      }
    ]
  },
  "output_2" : {
    "print_every" : "1000",
    "name" : "pot_energy.dat",
    "cols" : [
      {
        "type" : "step"
      },
      {
        "type" : "potential_energy"
      }
    ]
  }
}
lorenzo-rovigatti commented 2 years ago

Commit ca24b8b4295c8028be2da76f648078455f68ba56 added an analysis_observables_file that is used by DNAnalysis and has the same syntax as observables_file (which is used by oxDNA). I decided to keep the two separated to make it harder to overwrite files by accident.