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

Coordinates and topology doc rework #1827

Closed
wants to merge 12 commits into from
Closed

Conversation

richardjgowers
Copy link
Member

Fixes #1817 and some of #1175

See the issue for motivations.

This basically adds a layer to the docs of "how to load X files", focusing on how to create a Universe, rather than talking about how this is implemented. I replaced the two tables of supported formats with a single one, which then also has links to a page for each format. This should hopefully be enough for 90% of people. There's then links to implementation details (our current docs) for the remaining 10%.

GRO format is mostly finished so you can see the overall structure of how I want each format to look.

@@ -28,39 +28,6 @@
`GRO format`_ which includes a conversion routine for the box.


Writing GRO files
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So some docs have been "promoted" to the "loading your stuff" level. Eg user friendly stuff like this




+------------------+-----------+----------+--------------+-----+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally did a table like this, but then adding the links to this would be a complete mess, so I'm migrating slowly to a csv table below, which isn't aesthetically nice but is much faster to edit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSV is fine with me in rst.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not against the move to a CSV table as, yes, the RST table format is a pain to edit. Though, the CSV is difficult to read in the raw file so editing and catching errors may not be much easier. Because we will only rarely add new rows to the table, I raise a shy whisper in favor of the RST format that looks clearer in the source file.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your approach, I am pretty sure that it will be better for users.




+------------------+-----------+----------+--------------+-----+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSV is fine with me in rst.

+------------------+-----------+----------+--------------+-----+


.. _Supported formats:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We link to the coordinates and topology formats table in many places (including web site and wiki). We will need to update all of them...

A full list of valid values for these keywords are given in the below table.


.. note:: It is possible to pass tarballed/zipped versions of files. The
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tarballs??? Since when?? anyopen deals with zip, gz, bz2 as far as I know (and possibly streams although that's very brittle and I wouldn't mention it except when discussing magic with NamedStream).


.. _load_amber_trj:

Loading TRJ files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would talk about NCDF first – that's much better supported. See current docs (which I recently rewrote a little bit)

are currently supported. The known working versions and the
approximate Gromacs release numbers are listed in the table
:ref:`TPR format versions <TPR-format-table>`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might keep the technical info in the original place and link to it from here.

(type 3), Fourier dihedrals (type 5), restricted dihedrals (type 10),
combined bending-torsion potentials (type 11), tabulated dihedral (type 8)
* impropers: improper dihedrals (type 2), periodic improper dihedrals (type 4)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also read the molnum (?) attribute, that was something recent #1555

Loading GSD files with MDAnalysis
---------------------------------

GSD files in MDA.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limitations of the gsd package? #1829

@richardjgowers
Copy link
Member Author

@orbeckst thanks for the review, I'll keep pushing ahead with this then

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more comments


.. note:: If a file which also provides coordinates is used as a topology, no trajectory
information is read from this file. Ie the first frame will come from the trajectory
unless the `all_coordinates` keyword is set to ``True``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is all_coordinates new?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the Universe docs?

Single file Universes
---------------------

Occaisionally a file may contain both topology and trajectory information,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Occasionally


import MDAnalysis as mda

u = mda.Universe('topol.tpr', ['traj1.trr', 'traj2.trr'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a SeeAlso for the ChainReader – I know that this is technical but it is useful to know where to look regarding the details of how trajectories are concatenated, especially with #1728 in the works.


The Amber charge is converted to electron charges as used in
MDAnalysis and other packages. To get back Amber charges, multiply
by 18.2223.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps point to MDAnalysis.units where we store the value (and should also have written down what all these units are).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

.. _load_charmm:

####################################
Loading Charmm files with MDAnalysis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHARMM is all caps.


MDAnalysis is able to read most files used by Gromacs with the exception
of the TNG format which is currently in development.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start with TPR (as the topology format)

.. _load_lammps:

####################################
Loading Lammps files with MDAnalysis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LAMMPS is all-caps


Loading DCD files
-----------------

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to say something about units and how to set them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I don't really understand how units work. If there's existing docs I'll copy them over but I won't be able to write these myself

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look... need to remind myself.

@richardjgowers richardjgowers force-pushed the issue-1817-docs branch 3 times, most recently from ddb6e74 to 58a559a Compare April 5, 2018 19:26
richardjgowers and others added 6 commits June 12, 2018 16:10
added Amber and Gromacs stubs

added pdbqt stub

added hoomd docs stubs

too enthusiastic with hoooomd name

WIP of new loading files docs

added link to GROParser in loading_gro docs

added ibisco loading stub

added tinker stub

added lammps load stubs

fixed up docs table

added pdb load stubs

added charmm load doc stubs

more load doc stubs

finished stubs for load docs

wrote docs for loading ibisco/yasp

updated TOP loading docs

finished Amber loading docs

rearranged gromacs docs

typos for docs

reworked PQR docs
- fixed mistyped DUECREDIT_ENABLE environment variable
- put note to "please cite us" at the top
@coveralls
Copy link

coveralls commented Jun 12, 2018

Coverage Status

Coverage increased (+0.1%) to 89.892% when pulling 2a36ddd on issue-1817-docs into 70b9e9f on develop.


MDAnalysis aims to read any and all molecular simulation data,
from whatever files you provide to it.
This is done via the `Universe` object,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are single backtics allowed here? Does napoleon generate links to Universe? Otherwise I suggest using

:class:`~MDAnalysis.groups.universe.Universe` 


TRR and XTC files
-----------------

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to myself: also mention the special continuous ChainReader magic in #1728 once available.

@orbeckst
Copy link
Member

@richardjgowers do we still want to work on this PR, now with @lilyminium 's work? Otherwise we can close it.

@richardjgowers
Copy link
Member Author

I think this is done with the new user guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reader + Topology doc structure
4 participants