Closed MBartkowiakSTFC closed 3 months ago
Looks good but a few points.
The angular correlation results can depend on whether it was run with a trajectory which had been modified with moleculefinder or not. This looks like it is because in some cases the coordinates are not contiguous so the results will be different. Maybe the atoms positions should be are changed to be contiguous during the calculation?
Would it be a good idea to set the axis in the angular correlation to something physical since at the moment the results will depend the atom ordering. Maybe we can change it to the molecules axis of rotation and we'd then have angular correlation results for the three molecular axes.
Molecular finder can crash when it is used with some bulk system like with the p1 cp2k system from MDANSE-Examples. I got the following error.
Traceback (most recent call last):
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 313, in run
self.initialize()
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\MoleculeFinder.py", line 82, in initialize
inchistring = moltester.identify_molecule()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Chemistry\Structrures.py", line 55, in identify_molecule
rdDetermineBonds.DetermineBonds(mol_object, charge=0)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdDetermineBonds.DetermineBonds(NoneType)
did not match C++ signature:
DetermineBonds(class RDKit::ROMol {lvalue} mol, bool useHueckel=False, int charge=0, double covFactor=1.3, bool allowChargedFragments=True, bool embedChiral=True, bool useAtomMap=False, bool useVdw=False)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\xcb63893\AppData\Local\anaconda3\envs\MDANSE5\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Subprocess\Subprocess.py", line 46, in run
self._job_instance.run(self._job_parameters)
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 335, in run
raise JobError(self, tb)
MDANSE.Framework.Jobs.IJob.JobError: Traceback (most recent call last):
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 313, in run
self.initialize()
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\MoleculeFinder.py", line 82, in initialize
inchistring = moltester.identify_molecule()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Chemistry\Structrures.py", line 55, in identify_molecule
rdDetermineBonds.DetermineBonds(mol_object, charge=0)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdDetermineBonds.DetermineBonds(NoneType)
did not match C++ signature:
DetermineBonds(class RDKit::ROMol {lvalue} mol, bool useHueckel=False, int charge=0, double covFactor=1.3, bool allowChargedFragments=True, bool embedChiral=True, bool useAtomMap=False, bool useVdw=False)
I managed to address two of the points you raised:
Also, I improved the docstring of MoleculeFinder.
Looks good, works on my end. I've open a proposal for some enhancements to molecule related jobs in #399 which include the axis proposal from my comment above.
Description of work Some analysis types (AreaPerMolecule, AngularCorrelation) require the molecules in the system to have labels in order to be selected. However, not every MD engine assigns labels to molecules.
Fixes
To test