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

Packaging and github actions updates #393

Merged
merged 14 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install build packages
run: python -m pip install build wheel setuptools pytest

- name: Install dependencies
run: (cd MDANSE && python -m pip install -r requirements.txt)
- name: Install pytest
run: python -m pip install pytest

- name: install MDANSE
run: (cd MDANSE && python -m pip install .)
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install build packages
run: python -m pip install build wheel setuptools

- name: Install dependencies
run: (cd MDANSE && python -m pip install -r requirements.txt)
- name: Install build
run: python -m pip install build

- name: Build wheels
run: (cd MDANSE && python -m build)
Expand Down Expand Up @@ -62,8 +59,8 @@ jobs:
with:
name: ${{ matrix.os }}_python${{ matrix.python-version }}_wheel

- name: Install build packages
run: python -m pip install build wheel setuptools
- name: Install build
run: python -m pip install build

- name: Install MDANSE
if: runner.os == 'Linux' || runner.os == 'macOS'
Expand All @@ -73,9 +70,6 @@ jobs:
if: runner.os == 'Windows'
run: foreach ($file in Get-ChildItem *.whl) {python -m pip install $file}

- name: Install dependencies
run: (cd MDANSE_GUI && python -m pip install -r requirements.txt)

- name: Build wheels
run: (cd MDANSE_GUI && python -m build)
# to supply options, put them in 'env', like:
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,5 @@ share/python-wheels/
*.egg
MANIFEST

# extensions
*.pyd

# pycharm
.idea
Binary file removed Documents/geometry_and_space_groups.pdf
Binary file not shown.
Empty file removed Extensions/.gitignore
Empty file.
21 changes: 0 additions & 21 deletions MANIFEST.in

This file was deleted.

4 changes: 3 additions & 1 deletion MDANSE/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ MDANSE project has been created by:
MDANSE source code is currently developed by

* Eric Pellegrini
* Maciej Bartkowiak
* Chi Cheng
* Sanghamitra Mukhopadhyay
* Rastislav Turanyi

MDANSE former contributors:

* Bachir Aoun
* Gael Goret
* Remi Perenon
* Rastislav Turanyi

3 changes: 0 additions & 3 deletions MDANSE/Extensions/MDANSE_Extensions.egg-info/PKG-INFO

This file was deleted.

33 changes: 0 additions & 33 deletions MDANSE/Extensions/MDANSE_Extensions.egg-info/SOURCES.txt

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions MDANSE/Extensions/MDANSE_Extensions.egg-info/top_level.txt

This file was deleted.

7 changes: 3 additions & 4 deletions MDANSE/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
include LICENCE
include requirements.txt
include LICENSE

recursive-include Extensions/qhull_lib *.h *c *.pxd
recursive-include Extensions/xtc *.h *c *.pxd
recursive-include Src/MDANSE/Chemistry *.json
recursive-include Src/MDANSE/Framework *.json
recursive-include Tests/Data/*

recursive-include Doc *
graft Tests/UnitTests/Data
graft Doc

recursive-include Tests *.py
112 changes: 73 additions & 39 deletions MDANSE/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,79 @@
# MDANSE

## MDANSE Python Module

This is the module containing the command-line utilities and libraries of the
Molecular Dynamics Analysis for Neutron Scattering Experiments (MDANSE) software package.

If you would like to use a graphical user interface, you will need to install also the MDANSE_GUI package.

## Molecular Dynamics Analysis for Neutron Scattering Experiments

MDANSE is a python application designed for computing neutron observables from molecular dynamics (MD) trajectories that can
MDANSE is a Python application designed for computing neutron observables from molecular dynamics (MD) trajectories. The results can
be directly compared with neutron scattering experiments, particularly inelastic and quasi-elastic neutron scattering
spectroscopies.

To do this, it interfaces with a variety of MD simulation software such as CASTEP, VASP, DMOL, Gromacs, DL_POLY, CHARMM, LAMMPS, PBD, DFTB etc.,

and provides both a graphical user interface (GUI) and a command line interface.
To do this, it interfaces with a variety of MD simulation software such as CASTEP, VASP, DMOL, Gromacs, DL_POLY, CHARMM, LAMMPS, PBD, DFTB etc., and provides both a graphical user interface (GUI) and a command line interface.

This project is built on the development published previously: \
G. Goret, B. Aoun, E. Pellegrini, "MDANSE: An Interactive Analysis Environment for Molecular Dynamics Simulations",
J Chem Inf Model. 57(1):1-5 (2017).

## Quick start
## Version information

The easiest way to start using MDANSE is to download a built installer from out latest [github release](https://github.com/ISISNeutronMuon/MDANSE/releases/).
There, we provide installers for the major operating systems, Windows, Linux and MacOS, which can be downloaded and installed
any other software on that OS. After that, we recommend starting by using the GUI. The typical workflow will look as follows:
This is the alpha release of MDANSE 2.0.0. It is the first release since MDANSE has been ported to Python 3.
Please help us develop MDANSE by reporting any problems you experience when using the code.
The preferred way of reporting problems is by adding them to the [GitHub issue tracker](https://github.com/ISISNeutronMuon/MDANSE/issues).

1. Convert a trajectory from the file format generated by an MD simulation software into a NetCDF format (File>Trajectory conveters)
2. Load the converted trajectory into MDANSE (File>Load data)
3. Perform an analysis of choice (through the Plugins panel)
4. Check the results with the plotter
## Quick start: installation

We recommend that you install MDANSE in a Python virtual environment. You can create a virtual environment named mdanse_env by typing
```
python3 -m venv mdanse_env
```

The most complete user documentation of MDANSE can be found on [our Read the Docs page](https://mdanse.readthedocs.io). At the same time, it is still possible to access the original **[MDANSE User Guide](https://epubs.stfc.ac.uk/work/51935555)** \
To activate your virtual environment, type
```
source mdanse_env/bin/activate
```
in a bash console, or
```
mdanse_end/Scripts/activate.bat
```
if you are using cmd.exe on Windows.

Other information including example scripts can be found on the [MDANSE website](https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx)
While your virtual environment is active, you can install MDANSE:
```
pip install MDANSE
```
and see the basic information about its command line interface:
```
mdanse --help
```

If you experience problems with the installation, you may want to upgrade pip
```
pip install --upgrade pip
```
and try again.

## Quick start: workflow

The typical workflow of MDANSE:

1. Convert a trajectory from the file format generated by an MD simulation software into the MDANSE trajectory format,
2. Load the converted trajectory into MDANSE,
3. Perform an analysis,
4. Check the results with the plotter.

## Installing from source
The most complete user documentation of MDANSE can be found on [our Read the Docs page](https://mdanse.readthedocs.io/en/protos).

Since MDANSE is currently written in Python 2.7, installing it from the source code can be challenging. There are guides
for doing this in the [MDANSE User Guide](https://epubs.stfc.ac.uk/work/51935555),
[this issue](https://github.com/ISISNeutronMuon/MDANSE/issues/8), and the [Wiki](https://github.com/ISISNeutronMuon/MDANSE/wiki).
However, if your system is not included in any of these, or you have any difficulties, please don't hesitate to contact us.
Other information including example scripts can be found on the [MDANSE website](https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx)

## What can MDANSE do?

Firstly, MDANSE can interface with MD simulation software. It does this by providing converters for proprietary file formats
into MMTK-style NetCDF format, which is then used for all calculations. The following MD packages are supported:
Firstly, MDANSE can interface with MD simulation software. It does this by providing converters for different file formats
into an .MDT file (HDF format), which is then used for all calculations. The following MD packages are supported:

- CASTEP
- CHARMM
Expand All @@ -55,25 +88,20 @@ into MMTK-style NetCDF format, which is then used for all calculations. The foll
- PDB
- VASP
- XPLOR
- ASE

The converted trajectory can then be loaded into MDANSE, where it can be visualised via the Molecular Viewer and animated.
Various trajectory variables (positions, velocities, and forces) can also be plotted for each particle. Then, if the
trajectory is as expected, various properties can be calculated, which can be compared with neutron (or, some, with X-ray)
experimental data, or used as new data to draw conclusions from. The following properties can be computed:
Various trajectory variables (positions, velocities, and forces) can also be plotted for each particle. Then, various properties can be calculated, which can be compared with neutron (or, for some analysis types, with X-ray)
experimental data, or used as a prediction of results of a potential experiment. The following properties can be computed:

<details><summary>Dynamics</summary><ul>
<li>Angular correlation</li>
<li>Density of states</li>
<li>Mean Square Displacement</li>
<li>Order parameter</li>
<li>Position Autocorrelation Function</li>
<li>Velocity Autocorrelation Function</li>
</ul></details>

<details><summary>Infrared</summary><ul>
<li>Dipole Autocorrelation Function</li>
</ul></details>

<details><summary>Scattering</summary><ul>
<li>Current correlation function</li>
<li>Dynamic Coherent Structure Factor</li>
Expand All @@ -96,7 +124,7 @@ experimental data, or used as new data to draw conclusions from. The following p
<li>Solvent Accessible Surface</li>
<li>Spatial Density</li>
<li>Static Structure Factor</li>
<li>Voronoi</li>
<li>Voronoi (volume per atom)</li>
<li>X-Ray Static Structure Factor</li>
</ul></details>

Expand All @@ -105,13 +133,10 @@ experimental data, or used as new data to draw conclusions from. The following p
<li>Temperature</li>
</ul></details>

Each of these analyses can be configured in various ways. For example, the frames that are used can be changed, certain
atoms can be specified to be the only ones for which the property is computed, or specified atoms can be substituted with
different elements/isotopes. Finally, their results can be outputted in a NetCDF file, an HDF5 file, or a set of DAT
files, and those can then be plotted directly in MDANSE.
Each of these analyses can be controlled using a number of parameters. For example, the user can select a subset of trajectory frames or a subset of atoms on which to perform the calculation, or specified atoms can be substituted with
different elements/isotopes. Finally, their results can be saved in an MDA file (HDF5 format), or a set of DAT files (text format), and those can then be plotted directly in MDANSE.

More detailed information on how MDANSE works, what it can do, and the science can all be found in the
**[MDANSE User Guide](https://epubs.stfc.ac.uk/work/51935555)**
More detailed information on how MDANSE works, what it can do, and the science can all be found on [our Read the Docs page](https://mdanse.readthedocs.io/en/protos).

## Citing MDANSE

Expand All @@ -131,8 +156,8 @@ information.
MDANSE started as a fork of [version 3 of the nMOLDYN program](https://github.com/khinsen/nMOLDYN3).
nMOLDYN was originally developed by Gerald Kneller in 1995 and subsequently also by Konrad Hinsen, Tomasz Rog,
Krzysztof Murzyn, Slawomir Stachura, and Eric Pellegrini. MDANSE includes most of the code of nMOLDYN3, and also code
from the libraries [MMTK](https://github.com/khinsen/MMTK) and [ScientificPython](https://github.com/khinsen/ScientificPython),
in order to reduce dependencies and thus facilitate installation.
from the libraries [MMTK](https://github.com/khinsen/MMTK), [ScientificPython](https://github.com/khinsen/ScientificPython)
and [MDTraj](https://github.com/mdtraj/mdtraj).

For more information see:

Expand All @@ -141,7 +166,7 @@ K. Hinsen, E. Pellegrini, S. Stachura, G.R. Kneller J. Comput. Chem. (2012) 33:2

We are grateful to all the people who have helped in some way or another to improve nMOLDYN and/or MDANSE along those years.
Apart from the main developers mentioned above, we would like to acknowledge explicitly the contributions done in the past
by Bachir Aoun, Vania Calandrini, Paolo Calligari, Gael Goret and Remi Perenon.
by Bachir Aoun, Vania Calandrini, Paolo Calligari, Gael Goret, Remi Perenon and Rastislav Turanyi.

The MDANSE project is supported by Ada Lovelace Centre, ISIS Neutron and Muon Source, Science
and Technology Facilities Council, UKRI, and the Institut Laue-Langevin (Grenoble, France).
Expand All @@ -159,3 +184,12 @@ If you want to join the project contact:
ISIS Neutron and Muon Source \
Rutherford Appleton Laboratory \
Didcot, UK

## Software Inquiries

For questions or contributions related to the software, please contact:

>Dr. Maciej Bartkowiak ([email protected])\
ISIS Neutron and Muon Source \
Rutherford Appleton Laboratory \
Didcot, UK
2 changes: 2 additions & 0 deletions MDANSE/Src/MDANSE/Chemistry/ChemicalEntity.py
Original file line number Diff line number Diff line change
Expand Up @@ -2628,6 +2628,8 @@ def copy(self) -> "ChemicalSystem":

if self._atoms is not None:
_ = cs.atoms
else:
cs._atoms = None

return cs

Expand Down
1 change: 1 addition & 0 deletions MDANSE/Src/MDANSE/Extensions/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.o
*.so
*.pyd
Loading
Loading