Blog

SciPy 2022

MDAnalysis recently attended SciPy 2022!

SciPy was a fantastic opportunity to engage with the open-source community, build connections and see the amazing work being conducted all across the Scientific Python ecosystem.

Additionally, Hugo MacDermott-Opeskin presented a poster on our ongoing work as part of our CZI-EOSS4 grant. You can find his poster at the following FigShare DOI.

As part of the SciPy sprints session we ran an MDAnalysis Sprint where we invited people to contribute to MDAnalysis and collaborated on various ideas with community members. We would like to thank members of the Zarr, Xarray, Dask, scikit-learn and Pangeo Forge communities for some helpful and stimulating discussions.

We also participated in a #bio_at_scipy meetup to share ideas around engaging with the broader community and encouraging contributions.

— Richard Gowers, Hugo MacDermott-Opeskin, Tyler Reddy

Apple M1 conda packages for MDAnalysis 2.2.0

We now also have conda-forge packages for our MDAnalysis 2.2.0 release that directly support the Apple M1 ARM architecture (labelled osx-arm64).

On all

  • supported Python versions (3.8, 3.9, 3.10)
  • supported Operating Systems (Linux, Windows, MacOS)

you are now able to install and upgrade with conda

conda update -c conda-forge mdanalysis

For everything else about the new release, read our blog post about MDAnalysis 2.2.

— The MDAnalysis Team

MDAnalysis 2.2 is out

We are happy to release the version 2.2.0 of MDAnalysis!

In line with NEP 29, this version of MDAnalysis drops support for Python 3.7 and raises the minimum NumPy version to 1.19.0. Minimum version support has also been changed for the following packages; networkx>=2.0, scipy>=1.5.0, gsd>=1.9.3. Further details on MDAnalysis future support strategy and NEP29 will be released shortly.

Supported Python versions: 3.8, 3.9, 3.10

Supported Operating Systems:

  • Linux
  • Windows
  • MacOS (on x86_64 and for the first time on Apple M1 ARM architecture. Note that for M1 you can currently only install using pip)

Upgrading to MDAnalysis version 2.2.0

To update with conda from the conda-forge channel run

conda update -c conda-forge mdanalysis

To update from PyPi with pip run

pip install --upgrade MDAnalysis

For more help with installation see the installation instructions in the User Guide.

Notable new additions

  • @rsexton2 implemented a frames argument for AnalysisBase-derived classes (i.e. modern analysis classes) allowing for specific frames to be defined when running an analysis. This new feature allows one to run per-frame analysis on arbitrary subsets of trajectory frames. (PR #3415)
  • Thanks to @IAlibay, Python wheels are now made available through PyPI for x86_64 architectures (Issue #1300, PR #3680)
  • @PicoCentauri implemented a center_of_charge attribute for AtomGroups (PR #3671)
  • Thanks to @BFedder, LinearDensity now works with UpdatingAtomGroups (Issue #2508, PR #3617)
  • @rishu235 implemented a PCA transformation and an associated inverse-PCA transformation in the PCA analysis class (PR #3596, Issue #2703)
  • @cbouy implemented major improvements to the RDKitConverter’s accuracy (PR #3044)
    • accuracy of 99.14% when benchmarked against ChEMBL30
    • AtomGroups containing monatomic ion charges and edge cases with nitrogen, sulfur, phosphorus and conjugated systems should now have correctly assigned bond orders and charges.
  • @ALescoulie implemented a new AnalysisBase-derived Watson-Crick distance analysis class (PR #3611); the new MDAnalysis.analysis.nucleicacids module will eventually replace the old-style MDAnalysis.analysis.nuclinfo module.
  • Thanks to @tylerjereddy, MDAnalysis builds for Apple M1 are now available.

Important fixes

  • Fixed issues where calling the copy method of Readers did not preserve optional arguments (Issue #3664, PR #3685)
  • Fixed several issues where iterating trajectories had undefined behaviour
    • Iterating (not in memory) SingleFrame readers now reset modified trajectory attributes (Issue #3423)
    • Iterating using defined indices did not rewind the trajectory (Issue #3416)
  • Fixed issues with competing processes writing to an XTC offset file leading to offset corruption (Issue #1988, PR #3375)
  • Fixed issue preventing OpenMMTopologyParsers from parsing systems with missing elements (Issue #3317, PR #3511)
  • Fixed issue with encore.covariance.covariance_matrix not working when providing an external reference (Issue #3539, PR #3621)
  • Fixed issue with broken code paths for “residues” and “segment” groupings for LinearDensity (Issue #3571, PR #3572)
  • Improved the flexibility of MOL2 reading, allowing for optional columns (subst_id, subst_name and charge) not to be provided (Issue #3385, PR #3598)
  • Fixed several issues related to converting AtomGroups to RDKit molecules (PR #3044):
    • Atoms are now in the same order
    • atom.GetMonomerInfor().GetName() now follows the guidelines for PDB files
    • Using NoImplicit=False no longer throws a SanitizationError
  • Fixed issues with incorrect reading of triclinic boxes from DUMP files (Issue #3386, PR #3403)
  • Fixed issue with the BAT method modifying input coordinate data (Issue #3501)

For a full list of bugfixes see the CHANGELOG.

Other changes

  • The number of matches allowed when doing a smarts selection has been increased from the default 1000 to max(1000, n_atoms * 10), an additional set of smarts_kwargs can now also be passed to override this behaviour (Issue #3469, PR #3470)
  • The fasteners package is now a core dependency (PR #3375)
  • LinearDensity now saves the histogram bin edges for easier plotting as hist_bin_edges for each dimension in the results dictionary (Issue #2508, PR #3617)
  • ContactAnalysis now accepts AtomGroups (Issue #2666, PR #3565)

Deprecations

  • The following results attribute for LinearDensity are now deprecated: (Issue #2508, PR #3617)
    • pos is now mass_density
    • char is now charge_density
    • std entries are now stddev

Author statistics

This release was the work of 30 contributors, 21 of which are new contributors.

Our new contributors are: @BFedder @inomag @Agorfa @aya9aladdin @shudipto-amin @HenokB @umak1106 @tamandeeps @Mrqeoqqt @megosato @AnirG @rishu235 @manishsaini6421 @Sukeerti1 @robotjellyzone @markvrma @alescoulie @mjtadema @aditi2906 @rsexton2 @rafaelpap

Acknowledgements

Thanks to @mikemhenry for testing the M1 builds locally.

MDAnalysis thanks NumFOCUS for its continued support as our fiscal sponsor and the Chan Zuckerberg Initiative for supporting MDAnalysis under an EOSS4 award.

  • The MDAnalysis Team