Skip to content
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

Merged
merged 23 commits into from
Oct 3, 2020

Conversation

CharlyEmpereurmot
Copy link
Collaborator

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.

@@ -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)
Copy link
Contributor

@giovannidoni giovannidoni Sep 29, 2020

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]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right :)

swarmcg/swarmCG.py Outdated Show resolved Hide resolved
…orrectly make CG traj whole during optimization runs analysis + Fix dihedrals handling
'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
Copy link
Collaborator Author

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.

sys.exit()
# if len(sys.argv) == 1:
# args_parser.print_help()
# sys.exit()
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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

@CharlyEmpereurmot CharlyEmpereurmot merged commit a72d8da into develop Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants