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
42 stars 27 forks source link

Output_bonds script doesn't give information on timestep [BUG] XXX #47

Closed Prateek1410 closed 1 year ago

Prateek1410 commented 1 year ago

Hello!

For every configuration, the output_bonds shows t =0. Everything else seems to be the alright, based on the size, I think it has generated data completely just the time info is missing. Please help me with this, I need to run this command for a big set of data.

To Reproduce I ran this command: oat output_bonds input.txt trajectory.dat | tee output_bonds.txt >/dev/null 2>&1 &

Desktop (please complete the following information):

Warm Regards Prateek

ErikPoppleton commented 1 year ago

@lorenzo-rovigatti I believe this is a problem with the pair_energy observable, because that line that shows t=0 is being printed straight from the observable. I vaguely remember we discussed this many months ago but can't remember what the resolution was.

ErikPoppleton commented 1 year ago

I see, thank you! I will fix the other occurrences of that mistake.

lorenzo-rovigatti commented 1 year ago

You are very right Erik. output_bonds.py passed 0 as the current step to the observable. I have fixed the bug by passing backend.config_info().current_step.

Note that the code has changed a lot since we first implemented observables, which could now get access to the current step by using ConfigInfo's curr_step member. This is a change that I should be doing to the C++ code in the future as soon as I have some time.

ErikPoppleton commented 1 year ago

I have fixed it in all other scripts which use oxpy as well.