Scanning where guessing happens

05 July 20222

In the first couple of weeks, I started to look up the whole mdanalysis library to find out where the guesser methods are called. This was an important step before starting to code the context-aware guesser package, as it will give me an overview of how guessers are used inside the library and how I should transfer all those scattered guessers calling to be called by the new context-aware guesser API.

The main modules where attributes guessing is done are:


1- Parsers modules: guessing mass and atom type happens automatically inside most parsers. As I mentioned in the project idea post, we don’t want automatic guessing to take place, but at the same time, we want to avoid breaking the current behavior of mdanalysis, such that the default output must be the same for the current version of the library. To keep all of that, we will transfer all attributes guessing to happen inside the universe after parsers finish their work, additionally, we will make mass and atom types guessing happens by default if they are not provided in the topology file.


2- Universe: bond guessing happens inside the universe (main data structure in mdanalysis) if the user asked for this explicitly. IF the user asked for guessing bonds, the guess_bond method of the AtomGroup of the universe is called. So, we can keep the ‘guess_bonds’ universe attribute as it is and handle the guessing process by passing the context to the guess_bond method.


3- Hydrogen bond analysis and RDKit modules: If we handled the above modules appropriately, those modules will be easier to handle and modify.

Upcoming steps:


After making this analysis, the next step will be working on building the new guesser package and the API for passing the context to the universe.