Immediately after the user clicks on the "submit" button, he moved to the page "create_simulation_result.html" (the address is not changed, it is still "create_simulation").
This page shows the following steps in the simulation creation process:
Processing your parameters: Preparation before using OpenMM, for example: loading the PDB files, determining the relative position, merging into a single PDB file, and calls to "fix_pdb" function.
Minimizing energy (this is one of the steps that OpenMM performs).
Equilibrating (this is one of the steps that OpenMM performs).
Running simulation (this is one of the steps that OpenMM performs): Two details are displayed: "Progress" and "Remaining time".
Done.
Notes about the implementation:
In order to complete this feature, I used the "AJAX request", which allows us to update an html page without refreshing.
The AJAX request makes repeated calls to a view function (called "update_simulation_status"), which checks the status of the run by reading the files that updated by the thread running the simulation.
Both files are saved under "media/ files" folder. File Description:
"simulation_status.txt": Describes the current step (for example: "Done").
Description:
Immediately after the user clicks on the "submit" button, he moved to the page "create_simulation_result.html" (the address is not changed, it is still "create_simulation").
This page shows the following steps in the simulation creation process:
Processing your parameters
: Preparation before using OpenMM, for example: loading the PDB files, determining the relative position, merging into a single PDB file, and calls to "fix_pdb" function.Minimizing energy
(this is one of the steps that OpenMM performs).Equilibrating
(this is one of the steps that OpenMM performs).Running simulation
(this is one of the steps that OpenMM performs): Two details are displayed: "Progress" and "Remaining time".Done
.Notes about the implementation:
In order to complete this feature, I used the "AJAX request", which allows us to update an html page without refreshing. The AJAX request makes repeated calls to a view function (called "update_simulation_status"), which checks the status of the run by reading the files that updated by the thread running the simulation. Both files are saved under "media/ files" folder. File Description:
Sample screenshots: