You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is devoted to discussions and ideas around post-run operations.
Here is a detailed description of what needs to be done.
Let's discuss the details in this thread and put our suggestions. I will mark some discussion points that I think are worth discussing here.
Once a Signac's job run is finished, we need to perform a few steps automatically:
Step 1: Check Equilibrium
Check whether equilibrium is achieved at the end of the simulation. If not, restart the simulation from the last state point and resume. This cycle will be repeated until the equilibrium is reached.
For checking equilibrium condition, probably need to use is_equilibrated method in cmeutils's repo.. (we need to check this function first to make sure it is the right function for our usecase)
If not equilibrated, the simulation object must be recreated with restart=True. This will resume the system from last snapshot. Call sim.run(...) to resume the run.
Implementation details:
Equilibrium check step can be done somewhere in signac's sample() method in project.py. We can discuss the implementation details (discussion number 1). My suggestion is either using a while loop conditioned on the equilibrium state or a for loop with a cap on the number of run attempts.
To track the equilibration process, we can define equilibrium_state in job.doc. Setting it False by default during job initiation (inside the init.py file) , and setting it to True when equilibrated.
Log number of run attempts in job.doc.
Making sure saved simulation files are updating according to equilibration process. For example, for each attempt, we can create a new trajectory.gsd file or append to the previous once. (discussion num. 2)
Making sure logged values in job.doc are updating accordingly. Do we want values such as job.doc["tps"], job.doc["accepted_moves"], job.doc["acceptance_ratio"] to represent the whole process or only the last run attempt? (discussion num. 3)
Step 2: Post Equilibrium
After equilibration, save information such as decorrelation step and starting index in job.doc.
Implementation details:
equil_sample() method in cmeutils seems to be a good option. It uses pymbar timeseries module to find the start index for sampling. It returns the independent samples as well.
We can use Signac's pre/post operations to perform this step automatically. An operation in signac is triggered once its pre-conditions are met or at least one of its post-conditions is not met. This is a great opportunity to learn more about Signac. Here is some clues to start: signac tutorial, simple signac project with pre and post conditions.
Step 3: Save structural/analytical data
logging information that will be used later to draw phase diagrams or to analyze the trajectory :
Potential energy mean and standard deviation (Save in job.doc)
RDF, RDF peaks, ... (save in a txt file)
Average nearest neighbors (save in job.doc). We can take a step further and use the first minimum in RDF as the r_max.
[Add more if I missed something here]
Implementation details:
Same as previous step, this step can be automated using Signac's post/pre conditions.
The text was updated successfully, but these errors were encountered:
I like this!
One question: In Step 1, how does the simulation know to resume? I thought sim.run just restarted a simulation over from scratch. Does it also have resume functionalities?
In the Simulation class there is a parameter called restart that will start the simulation from whatever state point is passed to restart. Right now, restart is an array of positions, but Marjan has a PR #41 that let's us pass in a .gsd. file to restart from. In this case, the difference between this and restarting a simulation from scratch is the initial positions of the spheres.
This issue is devoted to discussions and ideas around post-run operations.
Here is a detailed description of what needs to be done.
Let's discuss the details in this thread and put our suggestions. I will mark some discussion points that I think are worth discussing here.
Once a Signac's job run is finished, we need to perform a few steps automatically:
Step 1: Check Equilibrium
Check whether equilibrium is achieved at the end of the simulation. If not, restart the simulation from the last state point and resume. This cycle will be repeated until the equilibrium is reached.
is_equilibrated
method in cmeutils's repo.. (we need to check this function first to make sure it is the right function for our usecase)restart=True
. This will resume the system from last snapshot. Callsim.run(...)
to resume the run.Implementation details:
sample()
method inproject.py
. We can discuss the implementation details (discussion number 1). My suggestion is either using a while loop conditioned on the equilibrium state or a for loop with a cap on the number of run attempts.equilibrium_state
in job.doc. Setting itFalse
by default during job initiation (inside the init.py file) , and setting it toTrue
when equilibrated.trajectory.gsd
file or append to the previous once. (discussion num. 2)job.doc["tps"]
,job.doc["accepted_moves"]
,job.doc["acceptance_ratio"]
to represent the whole process or only the last run attempt? (discussion num. 3)Step 2: Post Equilibrium
After equilibration, save information such as decorrelation step and starting index in job.doc.
Implementation details:
equil_sample()
method in cmeutils seems to be a good option. It uses pymbar timeseries module to find the start index for sampling. It returns the independent samples as well.Step 3: Save structural/analytical data
logging information that will be used later to draw phase diagrams or to analyze the trajectory :
r_max
.Implementation details:
Same as previous step, this step can be automated using Signac's post/pre conditions.
The text was updated successfully, but these errors were encountered: