ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
21 stars 5 forks source link

investigation: dependency on ILL mmtk module #6

Closed franzlang closed 9 months ago

franzlang commented 3 years ago

investigate what parts of the code depend on the custom mmtk module released by the ILL (https://code.ill.fr/scientific-software/mmtk) that the MDANSE code currently requires. also gain an understanding of and document why we could or could not use the "standard" mmtk module (https://github.com/khinsen/mmtk). if required: create issues for the different parts of the code that need to be updated so that we can use the standard mmtk module. note that we might want to not spend the time to update the code use the standard mmtk module as it is only available in python 2. here is a separate issue to investigate removing this dependency altogether: https://github.com/ISISNeutronMuon/MDANSE/issues/7.

RastislavTuranyi commented 3 years ago

Following is a list of all files in MDANSE that use the ILL MMTK module:

Converters MDANSE.Framework.Jobs.CHARMM
MDANSE.Framework.Jobs.Castep
MDANSE.Framework.Jobs.DCDConverter
MDANSE.Framework.Jobs.DFTB
MDANSE.Framework.Jobs.Discover
MDANSE.Framework.Jobs.DL_POLY
MDANSE.Framework.Jobs.DMol
MDANSE.Framework.Jobs.Forcite
MDANSE.Framework.Jobs.Gromacs
MDANSE.Framework.Jobs.LAMMPS
MDANSE.Framework.Jobs.MaterialsStudio
MDANSE.Framework.Jobs.NAMD
MDANSE.Framework.Jobs.PDB
MDANSE.Framework.Jobs.VASP
MDANSE.Framework.Jobs.XPLOR
Physical properties MDANSE.Framework.Jobs.AngularCorrelation
MDANSE.Framework.Jobs.AreaPerMolecule
MDANSE.Framework.Jobs.CoordinationNumber
MDANSE.Framework.Jobs.CurrentCorrelationFunction
MDANSE.Framework.Jobs.Density
MDANSE.Framework.Jobs.DensityOfStates
MDANSE.Framework.Jobs.DensityProfile
MDANSE.Framework.Jobs.DipoleAutoCorrelationFunction
MDANSE.Framework.Jobs.DistanceHistogram
MDANSE.Framework.Jobs.DynamicCoherentStructureFactor
MDANSE.Framework.Jobs.DynamicIncoherentStructureFactor
MDANSE.Framework.Jobs.Eccentricity
MDANSE.Framework.Jobs.ElasticIncoherentStructureFactor
MDANSE.Framework.Jobs.GaussianDynamicIncoherentStructureFactor
MDANSE.Framework.Jobs.GeneralAutoCorrelationFunction
MDANSE.Framework.Jobs.McStasVirtualInstrument
MDANSE.Framework.Jobs.MeanSquareDisplacement
MDANSE.Framework.Jobs.MolecularTrace
MDANSE.Framework.Jobs.NeutronDynamicTotalStructureFactor
MDANSE.Framework.Jobs.OrderParameter
MDANSE.Framework.Jobs.PositionAutoCorrelationFunction
MDANSE.Framework.Jobs.RadiusOfGyration
MDANSE.Framework.Jobs.RootMeanSquareDeviation
MDANSE.Framework.Jobs.RootMeanSquareFluctuation
MDANSE.Framework.Jobs.SolventAccessibleSurface
MDANSE.Framework.Jobs.SpatialDensity
MDANSE.Framework.Jobs.Temperature
MDANSE.Framework.Jobs.VelocityAutoCorrelationFunction
Trajectories MDANSE.Framework.Jobs.BoxTranslatedTrajectory
MDANSE.Framework.Jobs.CentreOfMassesTrajectory
MDANSE.Framework.Jobs.CroppedTrajectory
MDANSE.Framework.Jobs.GlobalMotionFilteredTrajectory
MDANSE.Framework.Jobs.RefoldedMembraneTrajectory
MDANSE.Framework.Jobs.RigidBodyTrajectory
MDANSE.Framework.Jobs.UnfoldedTrajectory
MDANSE.GUI.Widgets.MMTKTrajectoryWidget
MDANSE.GUI.Widgets.TrajectoryVariableWidget
MDANSE.MolecularDynamics.Trajectory
Selectors MDANSE.Framework.Selectors.ChainName
MDANSE.Framework.Selectors.Macromolecule
MDANSE.Framework.Selectors.NucleotideName
MDANSE.Framework.Selectors.NucleotideType
MDANSE.Framework.Selectors.PDBFile
MDANSE.Framework.Selectors.ResidueClass
MDANSE.Framework.Selectors.ResidueName
MDANSE.Framework.Selectors.ResidueType
Plugins MDANSE.GUI.Plugins.MolecularViewerPlugin
MDANSE.GUI.Plugins.PartialChargesPlugin
Tests MDANSE/Tests/UnitTests/TestConfigurator
All tests whose name starts with mmtk_ in
MDANSE/Tests/DependenciesTests/. These tests use many parts of ILL MMTK that the rest of the code does not use, but if I understand them correctly, these tests exist to check that MMTK works correctly, so if this custom module is removed in the rest of the codebase, they can be deleted altogether.
Other MDANSE.Framework.MMTKDefinitions
MDANSE.Framework.Jobs.McStasVirtualInstrument
MDANSE.Framework.Configurators.MMTKTrajectoryConfigurator

All the above files, excluding DependenciesTests/, use the following parts of ILL MMTK:

More detailed summary of the classes using MMTK can be found in the attached file: MDANSE MMTK.docx

RastislavTuranyi commented 3 years ago

From looking at the changes made to the ILL MMTK since it has been forked, and considering that most of the files in khinsen/MMTK have not been altered since before the ILL fork, it seems to me there should be few issues changing to the official MMTK, requiring few to no changes to the MDANSE code.

The main differences introduced in the ILL fork that seem relevant to MDANSE are as follows:

Other changes: - nonbonded1.i, ewald2.i, ewald1.i have been deleted
- MMTK.Subspace.Subspace.getBasis has a more concise implementation
perenon commented 2 years ago

FYI MMTK is not compatible with numpy versions after 1.9.0 (so Ubuntu 16.04), due to the use of Numeric (in Scientific.N). That explains the choice to use a custom version of MMTK, that we modified to get rid of Numeric.

eurydice76 commented 2 years ago

Anyway, the problem of MMTK in MDANSE is a no-problem as I could get rid of MMTK in the branch protos.

MBartkowiakSTFC commented 9 months ago

As noted above, MMTK is not used anymore in Python 3 version of MDANSE.