Package: mdciao
mdciao: Analysis of Molecular Dynamics Simulations Using Residue Neighborhoodsmdciaois a Python module that provides quick, “one-shot” command-line tools to analyze molecular simulation data using residue-residue distances.mdciaotries to automate as much as possible for non-experienced users while remaining highly customizable for advanced users, by exposing an API to construct your own analysis workflow.Under the hood, the modulemdtrajis doing most of the computation and handling of molecular information, usingBioPythonfor sequence alignment,pandasfor many table and IO related operations, andmatplotlibfor visualizaton. It tries to automatically use the consensus nomenclature forGPCRs, e.g.Ballesteros-Weinstein-Numberingor structure-based schemes byGloriam et al,G-proteins, viaCommon G-alpha Numbering (CGN), andKinases, via their85 pocket-residue numbering scheme.by either using local files or on-the-fly lookups of theGPCRdband/orhttps://www.mrc-lmb.cam.ac.uk/CGN/and/orKLIFS, respectively.Licensesmdciaois licensed under theGNU Lesser General Public License v3.0 or later(LGPL-3.0-or-later, see the LICENSE.txt).mdciaouses a modified version of the methodmdtraj.compute_contactsofmdtraj. This modified version is published along withmdciaoand can be found incontacts/_md_compute_contacts.py. Please see that file for details on the modifications.Modules used bymdciaohave different licenses. You can check any module’s license in your Python environment usingpip-licenses:>>> pip-licenses | grep module_nameStatusmdciaois in its initial development, with versions 0.Y.Z. Anything MAY change at any time.The public API SHOULD NOT be considered stable.DocumentationCurrently, docs are hosted athttp://proteinformatics.org/mdciao/, but this can change in the future.TODOsThis is an informal list of known issues and TODOs:keeping vs reporting contacts: a design choice has to be made wrt to the effect of ctc_cutoff_Ang on a ContactGroup:
If a given cutoff makes a ContactPair have freq=0, should the CP be kept in the CG, simply not reported? There’s now a branch for that:https://github.com/gph82/mdciao/tree/buffer_neighborhoodoverhaul the “printing” system with proper logging and warnings (perhaps useloguru)progressbar not very informative for one chunked trajectory or parallel runsBuilding the docs with sphinx v>2.4.4 doesn’t autogen a class’ method’s linked docthe affiliation of a residue to a fragment is done as “res@frag” on the string output and res^frag in figures, this implementation is simply using replace(“@”,”^”), could be betterparallel execution with memory mdtraj.Trajectory objects should be betterharmonize documentation API cli methods (mdciao.cli) and the CLI scripts (mdc_*)The interface between API methods and cli scripts could be better, using sth likeclickThe API-cli methods (interface, neighborhoods, sites, etc) have very similar flows but a lot of code repetition, I am suresome patterns/boilerplate could be outsourced/refactored even more.Most of the tests were written against a very rigid API that mimicked the CLI closely. Now the API is more flexible
and manytests could be re-written or deleted, like those needing
mock-input or writing to tempdirs because writing figures or files could not be avoided.There’s some inconsistencies in private vs public attributes of classes. An attribute might’ve “started” as private and is exceptionally used somewhere else until the number of exceptions is enough for it to make sense to be public, documented and well tested. I’m working on it.neighborlists could be computed much more efficientlyThe labelling names should be harmonized (ctc_label, anchor_res…) and the logic of how/where it get’s constructed (short_AA vs AA_format) is not obvious sometimesThere’s many other TODOs spread throughout the codeThe way uniprot or PDB codes are transformed to relative and/or absolute filenames to check if they exist locally should be unified across all lookup functions, like GPCR_finder, PDB_finder and/or the different LabelerConsensus objects, possibly by dropping optargs like ‘local_path’ or ‘format’.Some closely related methods could/should be integrated into each other by generalising a bit, but sometimes the generalisation is unnecessarily complicated to code (or I simply forget that the closely related method already exists) and re-code (and test!) for a slightly different scenario (though I try to hard to avoid it). E.g. there’s several methods for computing, reporting, and saving contact frequencies and contact-matrices, or different methods to assign residue idxs to fragments, depending on particual the goal of the assignment, like find_parent_list, in_what_(N)_fragments, or assign_fragments. Still, I opted for more smaller methods, which are individually easier to maintain, but that could simply be aquestionable choice.The ‘dictionary unifying’ methods could be preplaced with pandas.DataFrame.merge/joinSystem Requirementsmdciaois developed in GNU/Linux, and CI-tested viagithub actionsfor GNU/Linux and MacOs. Tested python versions are:GNU/Linux: 3.7, 3.8, 3.9, 3.10MacOs: 3.7, 3.8, 3.9So everything should workout of the boxin these conditions.Authorsmdciaois written and maintained by Guillermo Pérez-Hernández (ORCID) currently at theInstitute of Medical Physics and Biophysicsin theCharité Universitäsmedizin Berlin.Please cite “mdciao, G. Pérez-Hernández and P.W. Hildebrand, 2022 (submitted)”