-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added handling of virtual sites + Fixed an issue in BI #7
Conversation
…types_mass) that must be used in case there is no definition of the atom mass in the itp file of the molecule we want to optimize via fetch_cg_mass_itp(ns)
swarmcg/swarmCG.py
Outdated
@@ -20,113 +20,36 @@ | |||
from swarmcg.shared import exceptions | |||
from swarmcg.simulations.potentials import (gmx_bonds_func_1, gmx_angles_func_1, gmx_angles_func_2, | |||
gmx_dihedrals_func_1, gmx_dihedrals_func_2) | |||
from swarmcg.simulations.vs_functions import (vs2_func_1, vs2_func_2, vs3_func_1, vs3_func_2, vs3_func_3, vs3_func_4, vs4_func_2, vsn_func_1, vsn_func_2, vsn_func_3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
import swarmcg.simulations.vs_functions as f
and then referencing all fucntions as f.[function_name]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right :)
…orrectly make CG traj whole during optimization runs analysis + Fix dihedrals handling
swarmcg/config.py
Outdated
'angle': [1, 2], # tested and verified: 1, 2 | ||
'dihedral': [1, 2, 4], # tested and verified: 1, 2, 4 -- ongoing: 9 (need to merge the 1+ dihedrals groups on plots) | ||
'virtual_sites2': [1], # tested and verified: 1 -- ongoing: 2 (need GMX 2020) | ||
'virtual_sites3': [1, 2], # tested and verified: 1, 2 -- ongoing: 3, 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here I let only the verified ones and the program checks that the ITP uses functions we have validated as working. For evolving the code you thus need to put into these arrays the functions you want to work on, if they are not there already.
swarmcg/evaluate_model.py
Outdated
sys.exit() | ||
# if len(sys.argv) == 1: | ||
# args_parser.print_help() | ||
# sys.exit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's no do this in fact, because we might want to execute the script from within a directory in which all files are already present
|
||
coord[:, bead_id, :] = traj | ||
|
||
ns.aa2cg_universe.load_new(coord, format=mda.coordinates.memory.MemoryReader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mapping the trajectory like this is a whole lot cleaner and faster than what we were doing previously
00c7340
to
de23669
Compare
c4bc993
to
140271f
Compare
So in principle this handles all functions for virtual sites, except 3out and 4fd that I have left for later (mostly because I don't get the input/parameters/gromacs manual).
There was also a small issue in the direct boltzmann inversion that involved utils.sma() and utils.ewma(), which are rolled back and this seems to be all good.
I did not refactorize much of the previous code, but what has been added should be ~better compliant.