Closed ppxasjsm closed 6 years ago
Interesting. The only changes since that revision to MoleculeInfoData (which underpins the ID information used to detect if properties are compatible with molecules) is that some extra data was added to allow Sire to know what type of cutting scheme was used for the molecule (e.g. atom-based, residue-based etc.). This shouldn't have changed anything as it is informational only.
Could you post the full backtrace so we can see the path from which the exception was raised.
Compatibility between molecules and their properties is handled in SireMol/MolViewProperty. The virtual function "isCompatibleWith" checks for compatibility. The simple case is comparing MoleculeInfoData objects (same objects have the same unique ID, UID). More useful comparisons are checking that the property has the same number of atoms in the same order. If MolViewProperty is not compatible, then the virtual private function "_pvt_makeCompatibleWith" is called to create a copy of the molecule property that has been adapted to be compatible with the molecule. This uses a passed AtomMatcher to match atoms from the old property to atoms in the new property. By default, this does nothing except raising an error that the property cannot be adapted. However, many MolViewProperty subclasses are able to adapt themselves, e.g. AtomPairs.
A good way to debug and then ultimately fix your problem is to specialise the function "isCompatibleWith" and "_pvt_makeCompatibleWith" in SireMol/amberparameters.cpp/.h. Get the code to print out the MoleculeInfoData objects that are being adapted and see if you can easily adapt SireMol/AmberParameters to accept that change.
Note, there is also a SireMM/AmberParams object now. This is a rewrite of SireMol/AmberParameters and is created and used by the new AmberPrm/AmberRst parsers that have been added with BioSimSpace. I rewrote it as I needed a lot more detail and structure than was available in SireMol/AmberParameters, and could not remove or rename it as I am preserving the original SireIO/Amber parser to support old code. Ideally we will update somd in the future to use SireMM/AmberParams, as this is much more powerful (e.g. it can dynamically generate the necessary Amber parameters from SireCAS/Expression objects, even if the molecule was created from non-amber files or forcefields. It includes AmberBond, AmberAngle, AmberDihedral classes that perform the conversion and can also create Expression objects on the fly. It also supports a wider variety of data from the amberprm file.
Here is the full trace:
~/sire.app_dev_17.3/bin/somd-freenrg -C ../../input/sim.cfg -l 0.000 -p OpenCL
Starting /Users/toni_brain/sire.app_dev_17.3/bin/somd-freenrg: number of threads equals 4
Loading configuration information from file ../../input/sim.cfg
Running a somd-freenrg calculation using files ../../input/SYSTEM.top, ../../input/SYSTEM.crd and ../../input/MORPH.pert.
Using parameters:
===============
andersen == True
barostat == True
buffered coordinates frequency == 5000
center solute == True
constraint == hbonds-notperturbed
crdfile == ../../input/SYSTEM.crd
cutoff distance == 10 angstrom
cutoff type == cutoffperiodic
energy frequency == 250
equilibrate == False
equilibration iterations == 5000
hydrogen mass repartitioning factor == 1.0
lambda array == (0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0)
lambda_val == 0.0
minimal coordinate saving == True
minimise == True
morphfile == ../../input/MORPH.pert
ncycles == 100
nmoves == 20000
platform == OpenCL
precision == mixed
reaction field dielectric == 82.0
save coordinates == True
timestep == 0.002 ps
topfile == ../../input/SYSTEM.top
===============
### Running Single Topology Molecular Dynamics Free Energy on unknown ###
###================Setting up calculation=====================###
New run. Loading input and creating restart
lambda is 0.0
Create the System...
Traceback (most recent call last):
File "/Users/toni_brain/sire.app_dev_17.3/pkgs/sire-2017.3.0/share/Sire/scripts/somd-freenrg.py", line 146, in <module>
OpenMMMD.runFreeNrg(params)
File "/Users/toni_brain/sire.app_dev_17.3/lib/python3.5/site-packages/Sire/Tools/__init__.py", line 172, in inner
retval = func()
File "/Users/toni_brain/sire.app_dev_17.3/lib/python3.5/site-packages/Sire/Tools/OpenMMMD.py", line 1524, in runFreeNrg
system = createSystemFreeEnergy(molecules)
File "/Users/toni_brain/sire.app_dev_17.3/lib/python3.5/site-packages/Sire/Tools/OpenMMMD.py", line 843, in createSystemFreeEnergy
solute = solute.edit().rename(lig_name).commit()
UserWarning: Exception 'SireError::incompatible_error' thrown by the thread 'master:main'.
The property of type SireMol::AmberParameters is incompatible with the layout with UID {8c228e75-26cd-4851-bbc3-813833e99c77}
Thrown from FILE: /Users/toni_brain/Projects/git/Sire/corelib/src/libs/SireMol/molviewproperty.cpp, LINE: 74, FUNCTION: void SireMol::MolViewProperty::assertCompatibleWith(const SireMol::MoleculeInfoData &) const
__Backtrace__
( 0) libSireError.2017.3.0.dylib (0x000000010d341b8b +59)
-- SireError::getBackTrace()
( 1) ??? (0x0000000115fae86d +4663732333)
-- 0x0
__EndTrace__
Exception 'SireError::incompatible_error' thrown by the thread 'master:main'.
The property of type SireMol::AmberParameters is incompatible with the layout with UID {8c228e75-26cd-4851-bbc3-813833e99c77}
Thrown from FILE: /Users/toni_brain/Projects/git/Sire/corelib/src/libs/SireMol/molviewproperty.cpp, LINE: 74, FUNCTION: void SireMol::MolViewProperty::assertCompatibleWith(const SireMol::MoleculeInfoData &) const
It is run with this commit: 889f1b0e00394fbad049a650978fa33550912793
Files to reproduce this are attached.
Thanks. The error was a bug in the copy-constructor of AmberParameters. It failed to copy the MoleculeInfoData object. This is an old bug which was only revealed by some code that was added between 2017.2 and 2017.3. I've fixed the bug in commit cf5ff35 which I've pushed to devel.
Hi,
Can we make a 2017.3.1 as well with that bugfix? Otherwise we don’t have a working binary of somd until 2018.1
Best wishes,
Julien
Sent from my iPhone
On 12 Feb 2018, at 14:16, Christopher Woods notifications@github.com wrote:
Thanks. The error was a bug in the copy-constructor of AmberParameters. It failed to copy the MoleculeInfoData object. This is an old bug which was only revealed by some code that was added between 2017.2 and 2017.3. I've fixed the bug in commit cf5ff35 which I've pushed to devel.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi all,
there seems to be a problematic error in the 2017.3 release I haven't come across before, I'll double check if this is fixed in the current devel version.
Running a dataset that worked fine on the 2017.2 dev. In particular at a version of this commit: commit ee5e2f48b38030cc9756903717aac1a15f290604
The error I get is:
Sire version:
Data to reproduce the error can be found here: http://siremol.org/tutorials/somd/Binding_free_energy/Data/production.zip For more info on how to run it: http://siremol.org/tutorials/somd/Binding_free_energy/Production.html