GMPavanLab / Swarm-CG

Swarm-CG: Automatic Parametrization of Bonded Terms in MARTINI-based Coarse-Grained Models of Simple to Complex Molecules via Fuzzy Self-Tuning Particle Swarm Optimization
https://pubs.acs.org/doi/10.1021/acsomega.0c05469
MIT License
42 stars 10 forks source link

Enable simulation parameter editing #35

Closed giovannidoni closed 3 years ago

giovannidoni commented 3 years ago

This pr applies the change in production step of simaltions previously implemented but not triggered. Using a quickest setup does not seems to speedup much calculation for testing; it is likely that this is due to the fact that we are writing the same number of output frames. End2end test is now triggered when pushing and merging to master and develop.

CharlyEmpereurmot commented 3 years ago

Ok that's perfect. For testing we can reduce the number of printed frames to ~50 and there will be a speed-up indeed (plots will look ugly but that's all that should change). Then to get a 10-fold speed-up for testing, we can set nb_particles = 2 within optimize_model.py in the loop that calls solve_with_fstpso(). By default a formula is used to calculate the ideal number of particles to be used (and here 1 particle = 1 simulation), according of the number of parameters to optimize (which varies depending on if we are doing bonds/angles/dihedrals or a combination of those), so that's why it was calculated in this loop.

giovannidoni commented 3 years ago

Ok that's perfect. For testing we can reduce the number of printed frames to ~50 and there will be a speed-up indeed (plots will look ugly but that's all that should change). Then to get a 10-fold speed-up for testing, we can set nb_particles = 2 within optimize_model.py in the loop that calls solve_with_fstpso(). By default a formula is used to calculate the ideal number of particles to be used (and here 1 particle = 1 simulation), according of the number of parameters to optimize (which varies depending on if we are doing bonds/angles/dihedrals or a combination of those), so that's why it was calculated in this loop.

Implemented