-
Notifications
You must be signed in to change notification settings - Fork 26
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
Reading/using virtual sites automatically #331
Comments
You could do that. But, what are the reasons not to use AtomCharges or AtomLJs? In the Monte Carlo code a virtual site is just a dummy atom (zero charge and zero LJ parameters). Would it be easier to adapt the perturbation code to allow virtual sites to use zero charge and LJ parameters, rather than add a new v-siteProperty? |
hi @SofiaBariami the v-sites do not map cleanly on atom properties because so far we are treating v-sites as a molecules properties that provides a list of virtual sites to apply to a molecule. This was easier to code via a property dictionary attached to a molecule to get going. @chryswoods suggestion could work if the code reading in v-sites is updated to edit Sire molecules to add new atoms. This means changing a bit the code you have been writing, but would minimise additional changes needed in Sire. Could you review this alternative route, post a ''walkthrough'' of the changes required and ask @jmichel80 @lohedges @chryswoods to comment on the solution ? |
Thank you @chryswoods and @jmichel80 for the suggestions. Here are some thoughts about the implementation: First of all, if we set the virtual site as a zero-mass atom, does this mean that we do not need to call Charges and LJ parameters can still be read from the property dictionary and added to |
Hello,
I am trying to modify the code in Sire to automatically read and recognise virtual sites. So far I am doing this manually, by inserting the parameters of the virtual sites in the code of openmmfrenergyst.cpp. What we would like to do is generate a MORPH.pert file with BSS that has a specific section for the virtual sites like the following and modify Sire source code to understand the information.
Please correct me if I'm wrong, but from my understanding, we should create a new perturbations template at
corelib/src/libs/SireIO/perturbationslibrary.cpp
similar to the one that is used for atoms. Then we need to define the parameters of the virtual sites :and finally set the parameters:
We also need to set the v-sites properties names and property maps. For example:
After this is done, we need to modify the source code at
openmmfrenergyst.cpp
in order for Sire to understand the parameters as charges and LJ. For example, the corresponding part of the code for atoms would be the following:For virtual sites, we cannot assign the parameters as “AtomCharges” or “AtomLJs” because these properties are just used to describe atoms.
My question is if we should define new “V-siteCharges” and “V-siteLJs” and a class V-siteProperty to include the new parameters? To do that do we also need to make two new files “SireMM/v-sitesljs.h/cpp” and “SireMM/v-sitescharges.h/cpp” that define the property, similar to the existing ones for atoms and also define a new v-siteProperty similar to
AtomProperty<SireMM::LJParameter>
for example? If so how can we do that?I'd really appreciate any help on that issue.
Thank you very much!
The text was updated successfully, but these errors were encountered: