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

Simplify Chemical System #616

Open
wants to merge 50 commits into
base: protos
Choose a base branch
from

Conversation

MBartkowiakSTFC
Copy link
Collaborator

@MBartkowiakSTFC MBartkowiakSTFC commented Nov 29, 2024

Description of work
Most of the classes derived from ChemicalEntity were only used for a very specific case of a trajectory created by GROMACS with a PDB file describing the topology. Since MDANSE is moving to MDAnalysis for loading GROMACS trajectories, the selection mechanism based on fixed databases needs to be replaced with a more general solution. This is provided by rdkit and substructure matching. Since rdkit introduces its own indexing of atoms, not guaranteed to be consistent with the internal indexing of the ChemicalSystem class, changes are necessary to improve the consistency of the atom indexing.

Fixes

  1. ChemicalEntity and all derived classes have been removed from the code.
  2. The only database remaining in the Chemistry section is the atoms database.
  3. Atom indexing is now fixed and matches the indexing in the coordinate array.
  4. New ChemicalSystem implementation stores lists of indices.
  5. ChemicalSystem does not have a "configuration" attribute anymore. Configuration is accessed only via the Trajectory class.
  6. A backup ChemicalSystem loader allows the users to load old trajectories. The new ChemicalSystem instance will be created in memory and populated with information from the old /chemical_system data structure.
  7. The trajectory stores a subset of the atom database, preserving the user-made changes to atom definitions and making trajectories portable even if they use artificial atoms.
  8. Atom selection works for trajectories independent of the molecular dynamics engine used to run the simulation. However, it is necessary to detect bonds in the system using the TrajectoryEditor job before it is possible to select structures.
  9. Most of the Cython extensions have been replaced with Python equivalents.

To test
All unit tests must pass.
A detailed comparison of the results between this and main branches is necessary due to the fundamental changes to the way the code operates.
Please run TrajectoryEditor with molecule detection on a trajectory and check if all the expected Atom Selection options are working correctly in the GUI.

Jobs that require the most attention:

  • CenterOfMassTrajectory
  • Voronoi
  • SolventAccessibleSurface
  • PairDistributionFunction
  • VanHoveSelf
  • VanHoveDistinct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant