Skip to content
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

investigation: dependency on ILL mmtk module #6

Closed
franzlang opened this issue Jul 5, 2021 · 5 comments
Closed

investigation: dependency on ILL mmtk module #6

franzlang opened this issue Jul 5, 2021 · 5 comments
Labels
dependency regarding a dependency of the code

Comments

@franzlang
Copy link
Collaborator

franzlang commented Jul 5, 2021

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: #7.

@franzlang franzlang added the documentation Improvements or additions to documentation label Jul 5, 2021
@franzlang franzlang added dependency regarding a dependency of the code and removed documentation Improvements or additions to documentation labels Jul 5, 2021
@RastislavTuranyi
Copy link
Collaborator

RastislavTuranyi commented Aug 16, 2021

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:

  • Biopolymers
  • ChemicalObjects (Atom, AtomCluster, Molecule)
  • Collections
  • Database
  • NucleicAcids
  • ParticleProperties
  • PDB
  • Proteins
  • Trajectory
  • Units
  • Universe

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

@RastislavTuranyi
Copy link
Collaborator

RastislavTuranyi commented Aug 18, 2021

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:

  • in many files, Scientific.N has been replaced with numpy (this should prove no issues since N just provides wrappers/renames numpy functions, though in some files this has significanly simplified the imports)
  • a part of MMTK.Collections has been rewritten to use numpy functions and arrays instead of Scientific.Vector
  • in MMTK_universe.c and other c files, snprintf has been replaced with PyOS_snprintf
  • the constants in MMTK.Units were altered to contain more accurate numbers (eg. Planck's constant = 6.62606957e-34, not 6.626176e-34). Fortunately, this change has also been implemented in khinsen/MMTK.
  • MMTK_universe.c has been altered for readability (introducing temporary variables)
  • there have been significant changes to setup.py
Other changes: - nonbonded1.i, ewald2.i, ewald1.i have been deleted
- MMTK.Subspace.Subspace.getBasis has a more concise implementation

@perenon
Copy link
Contributor

perenon commented Sep 6, 2022

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
Copy link
Collaborator

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

@MBartkowiakSTFC
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency regarding a dependency of the code
Projects
None yet
Development

No branches or pull requests

5 participants