Reporter Behavior
Posted: Wed Oct 30, 2019 1:54 pm
I was working with a custom reporter from within iPython, and I noticed something that I'd like to clarify. My reporter just makes measurements of the system and writes them to a text file at the specified interval. I observed that, in iPython, if I did
I would find that my text file would sometimes be empty or not have recorded every step. If I quit iPython, it wrote as expected, and if I instead just did
at the command line, it behaved as expected. It seems like the reporters (or at least my custom one) only flush when a particular event is triggered. I was wondering if someone could clarify how this is controlled (assuming this is normal behavior).
Code: Select all
[1] %run openmm_script.py
Code: Select all
$ python openmm_script.py