Skip to content
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
20 changes: 19 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: ~> 1.0
language: generic
group: travis_latest

Expand Down Expand Up @@ -74,6 +75,16 @@ matrix:
PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0"
ASV_CHECK="true"

- env: NAME="pypi check"
PYTHON_VERSION=3.7
CODECOV="false"
MAIN_CMD="cd package && python setup.py"
SETUP_CMD="sdist"
BUILD_CMD=""
INSTALL_HOLE="false"
CONDA_DEPENDENCIES="setuptools cython twine"
PYPI_CHECK="true"

- os: osx
env: PYTHON_VERSION=3.6
NUMPY_VERSION=1.17.3
Expand Down Expand Up @@ -124,7 +135,14 @@ script:
cd ../benchmarks
time python -m asv check -E existing
fi

# check pypi package build
- |
if [[ "${PYPI_CHECK}" == "true" ]]; then
DISTRIBUTION=$(ls -t1 ${TRAVIS_BUILD_DIR}/package/dist/MDAnalysis-*.tar.gz | head -n 1)
test -n "${DISTRIBUTION}" || { echo "no distribution package/dist/MDAnalysis-*.tar.gz found"; exit 1; }
echo "twine check $DISTRIBUTION"
twine check $DISTRIBUTION
fi

after_success:
- |
Expand Down
118 changes: 75 additions & 43 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@ MDAnalysis also includes widely used analysis algorithms in the `MDAnalysis.anal
The MDAnalysis project uses an `open governance model`_ and is fiscally sponsored by `NumFOCUS`_. Consider making
a `tax-deductible donation`_ to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

.. raw:: html

<div align="center">
<a href="https://numfocus.org/project/mdanalysis">
<img height="60px"
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
alt="NumFOCUS Logo"
align="center">
</a>
</div>
<br />

.. image:: https://www.mdanalysis.org/public/images/numfocus-sponsored-small.png
:alt: NumFOCUS (Fiscally Sponsored Project)
:target: https://numfocus.org/project/mdanalysis
:align: center

This project is bound by a `Code of Conduct`_.

Expand All @@ -53,45 +45,68 @@ Example analysis script
# Iterate through trajectories
for ts in u.trajectory:
print(ag.center_of_mass())

There are a number of tutorials_ on the MDAnalysis homepage that explain
how to conduct RMSD calculations, Alignment and many more features of MDAnalysis.

Source code
===========

Source code is hosted in a git repository at
Documentation
=============

**New users** should read the `Quickstart Guide`_ and might want to
look at our videos_, in which core developers explain various aspects
of MDAnalysis.

**All users** should read the `User Guide`_.

**Developers** may also want to refer to the `MDAnalysis API docs`_.

https://github.com/MDAnalysis/mdanalysis
A growing number of **tutorials_** are available that explain how to
conduct RMSD calculations, structural alignment, distance and contact
analysis, and many more.

and is available under the GNU General Public License, version 2 (see
the file LICENSE_).

This is the top level of the master repository. It contains
Installation and availability
=============================

1. the MDAnalysis toolkit source files in the directory ::
The latest release can be **installed via ``pip`` or ``conda``** as
described in the `Installation Quick Start`_.

package/
**Source code** is hosted in a git repository at
https://github.com/MDAnalysis/mdanalysis and is available under the
GNU General Public License, version 2 (see the file LICENSE_).

2. the unit tests together with any input files required for
running those tests in the directory ::

testsuite/
Contributing
============

The directory ``maintainer`` contains scripts only needed for
maintaining releases and are not generally useful for the user or the
typical developer.
Please report **bugs** or **enhancement requests** through the `Issue
Tracker`_. Questions can also be asked on the `user mailing list`_.

(For more details on the directory layout see `Issue 87`_ on the
MDAnalysis issue tracker.)
If you are a **new developer** who would like to start contributing to
MDAnalysis get in touch on the `developer mailing list`_. To set up a
development environment and run the test suite read the `developer
guide`_.

Guide for Developers
====================

To set up a development environment and run the test suite you can use this
guide_. If you are a new developer who would like to start contributing to
MDAnalysis, you can help increase our code coverage, the guides explain how
to find uncovered code.
Citation
========

When using MDAnalysis in published work, please cite the following
two papers:

* R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy,
M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski,
S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis:
A Python package for the rapid analysis of molecular
dynamics simulations. In S. Benthall and S. Rostrup,
editors, Proceedings of the 15th Python in Science
Conference, pages 102-109, Austin, TX, 2016. SciPy.
doi:`10.25080/Majora-629e541a-00e`_

* N. Michaud-Agrawal, E. J. Denning, T. B. Woolf,
and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular
Dynamics Simulations. *J. Comput. Chem.* **32** (2011), 2319--2327.
doi:`10.1002/jcc.21787`_

For citations of included algorithms and sub-modules please see the references_.



Expand All @@ -106,13 +121,30 @@ to find uncovered code.
.. _`Code of Conduct`: https://www.mdanalysis.org/pages/conduct/
.. _trajectory formats: https://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1
.. _topology formats: https://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats
.. _Issue 87: https://github.com/MDAnalysis/mdanalysis/issues/87
.. _MDAnalysis: https://www.mdanalysis.org
.. _LICENSE: https://github.com/MDAnalysis/mdanalysis/blob/master/LICENSE
.. _`#286`: https://github.com/MDAnalysis/mdanalysis/issues/286
.. _LICENSE:
https://github.com/MDAnalysis/mdanalysis/blob/master/LICENSE
.. _`Installation Quick Start`:
https://www.mdanalysis.org/pages/installation_quick_start/
.. _`MDAnalysis.analysis`: https://docs.mdanalysis.org/documentation_pages/analysis_modules.html
.. _`tutorials`: https://www.mdanalysis.org/pages/learning_MDAnalysis/
.. _`guide`: https://github.com/MDAnalysis/mdanalysis/wiki/Guide-for-Developers
.. _`tutorials`: https://userguide.mdanalysis.org/examples/README.html
.. _`videos`: https://www.mdanalysis.org/pages/learning_MDAnalysis/#videos
.. _`Quickstart Guide`:
https://userguide.mdanalysis.org/examples/quickstart.html
.. _`User Guide`: https://userguide.mdanalysis.org
.. _`MDAnalysis API docs`:
https://docs.mdanalysis.org
.. _`Issue Tracker`: https://github.com/mdanalysis/mdanalysis/issues
.. _`user mailing list`:
https://groups.google.com/group/mdnalysis-discussion
.. _`developer guide`:
https://userguide.mdanalysis.org/contributing.html
.. _`developer mailing list`:
https://groups.google.com/group/mdnalysis-devel
.. _`10.1002/jcc.21787`: https://dx.doi.org/10.1002/jcc.21787
.. _`10.25080/Majora-629e541a-00e`: https://doi.org/10.25080/Majora-629e541a-00e
.. _references: https://docs.mdanalysis.org/documentation_pages/references.html


.. |usergroup| image:: https://img.shields.io/badge/Google%20Group-Users-lightgrey.svg
:alt: User Google Group
Expand Down
9 changes: 5 additions & 4 deletions package/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ global-include *.pyx
global-include *.pxd
global-include *.c
global-include *.h
include MDAnalysis/coordinates/xdrfile/src/*
include MDAnalysis/lib/src/pyqcprot/*
global-include *.cpp
include MDAnalysis/lib/src/transformations/*
recursive-include doc *
include README INSTALL CHANGELOG LICENSE AUTHORS SUMMARY.txt
include README INSTALL CHANGELOG LICENSE AUTHORS
include setup.py
global-exclude doc/html/html
global-exclude *.pyc
global-exclude *.pyo
global-exclude *.pyd
global-exclude *~
global-exclude *~
global-exclude .git
2 changes: 1 addition & 1 deletion package/MDAnalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
http://groups.google.com/group/mdnalysis-discussion

Please report bugs and feature requests through the issue tracker at
http://issues.mdanalysis.org
https://github.com/MDAnalysis/mdanalysis/issues

Citation
--------
Expand Down
5 changes: 3 additions & 2 deletions package/MDAnalysis/core/_get_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def get_reader_for(filename, format=None):
" See https://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1\n"
" Use the format keyword to explicitly set the format: 'Universe(...,format=FORMAT)'\n"
" For missing formats, raise an issue at "
"http://issues.mdanalysis.org".format(
"https://github.com/MDAnalysis/mdanalysis/issues".format(
format, filename, _READERS.keys()))
raise ValueError(errmsg) from None

Expand Down Expand Up @@ -251,7 +251,8 @@ def get_parser_for(filename, format=None):
" {1}\n"
" See https://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats\n"
" For missing formats, raise an issue at \n"
" http://issues.mdanalysis.org".format(format, _PARSERS.keys()))
" https://github.com/MDAnalysis/mdanalysis/issues".format(
format, _PARSERS.keys()))
raise ValueError(errmsg) from None
else:
return _PARSERS['MINIMAL']
Expand Down
16 changes: 9 additions & 7 deletions package/MDAnalysis/core/universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,11 @@ def add_TopologyAttr(self, topologyattr, values=None):
errmsg = (
"Unrecognised topology attribute name: '{}'."
" Possible values: '{}'\n"
"To raise an issue go to: http://issues.mdanalysis.org"
"To raise an issue go to: "
"https://github.com/MDAnalysis/mdanalysis/issues"
"".format(
topologyattr, ', '.join(sorted(_TOPOLOGY_ATTRS.keys()))))
topologyattr, ', '.join(
sorted(_TOPOLOGY_ATTRS.keys()))))
raise ValueError(errmsg) from None
else:
topologyattr = tcls.from_blank(
Expand Down Expand Up @@ -1285,10 +1287,10 @@ def _fragdict(self):
fragdict[a.ix] = fraginfo(i, f)

return fragdict

@classmethod
def from_smiles(cls, smiles, sanitize=True, addHs=True,
generate_coordinates=True, numConfs=1,
def from_smiles(cls, smiles, sanitize=True, addHs=True,
generate_coordinates=True, numConfs=1,
rdkit_kwargs={}, **kwargs):
"""Create a Universe from a SMILES string with rdkit

Expand Down Expand Up @@ -1346,7 +1348,7 @@ def from_smiles(cls, smiles, sanitize=True, addHs=True,
from rdkit.Chem import AllChem
except ImportError as e:
raise ImportError(
"Creating a Universe from a SMILES string requires RDKit but "
"Creating a Universe from a SMILES string requires RDKit but "
"it does not appear to be installed") from e

mol = Chem.MolFromSmiles(smiles, sanitize=sanitize)
Expand All @@ -1358,7 +1360,7 @@ def from_smiles(cls, smiles, sanitize=True, addHs=True,
if not addHs:
raise ValueError("Generating coordinates requires adding "
"hydrogens with `addHs=True`")

numConfs = rdkit_kwargs.pop("numConfs", numConfs)
if not (type(numConfs) is int and numConfs > 0):
raise SyntaxError("numConfs must be a non-zero positive "
Expand Down
Loading