-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature exception #140
Feature exception #140
Conversation
…re not used to assign LJ i,j parameters (also used for LJ 12-6-4 parameters)
…s required modifying PhysUnit so that it could get the typeName of generic types that had not been registered previously
…ns to handle LJ_ij exceptions. In doing this, I saw that I am not properly doing the magic and versioning for streaming AtomProperty<T> objects... Partly to fix this, I have added the check in SireStream::readHeader to put the stream back to its last position if the magic error fails. This allows me to detect a wrong magic, and to then choose a different class or try to stream differently. I need to check if this causes any performance problems
…im/sire into feature_exception
…im/sire into feature_exception
…im/sire into feature_exception
…im/sire into feature_exception
…im/sire into feature_exception
…im/sire into feature_exception
…im/sire into feature_exception
…LJ exceptions read from the Amber topology file before assigning to molecules.
for the magic in the stream. This is more robust, quicker and, more importantly, actually works. Have used this to properly add version and magic support to SparseMatrix. This is tested via reading the neopentane BioSimSpace merged molecule s3 file.
…ow need to compile and link... WIP
…rsions from strings to units to make things easier
… atom pairs. Needs debugging and optimising!
…-4 potentials where most atom pairs have exceptions. It takes 7-8 seconds, and is challenging to multi-thread
…ibility and editability of the current design - first step, make LJExceptionID and LJException visible classes.... WIP
…ickly, using an O(n) algorithm. And they still retain the flexibility. Next step is extracting them back so that I can write out the prmtop file correctly.
… to make sure everything is ok. It looks like there is a test failure involving saving of the self 12-6-4 parameter
…ct if a prmtop file uses geometric combining rules, and to save this into the "forcefield" property. This can be used to make sure that that the prmtop is written out using the same combining rules as had been read (through most will always be arithmetic)
…for Unit typenames Also remembered to add this to the changelog
Thanks for this.
Just to check... I seem to be able to write your test system to In [1]: import sire as sr
In [2]: s = sr.load_test_files("apo_1264.prm7", "apo_1264.rst7")
In [3]: sr.save(s, "test.grotop")
Out[3]: ['/home/lester/Code/openbiosim/sire/test.grotop'] Should this trigger an exception, or are there simply additional terms that are not written to the GROMACS topology file? If the latter, should we think about adding a warning to say that these terms aren't supported and will be lost so that the user isn't surprised? |
This PR adds support for reading and writing LJ 12-6-4 parameters from Amber topology files. This includes supporting Amber topology files which use LJ exceptions (i.e. the LJ parameter for an atom pair is not equal to a combining-rule combination of the atom-based parameters).
In doing this I have also detected when the topology file uses geometric combining rules and save this into the forcefield.
devel
into this branch before issuing this pull request (e.g. by runninggit pull origin devel
): [y]Suggested reviewers:
@lohedges
Any additional context of information?
The LJ exceptions can't be written to anything other than an Amber topology file, because only that format supports them. Also, they are not yet copied into the OpenMM context - I will do that via another feature branch. It is complex, as it will have to be via a custom exception force.