Skip to content

Formats and AtomGroup methods #30

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

Merged
merged 27 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3372d94
started topology formats
lilyminium Nov 5, 2019
0756777
switched console to ipython
lilyminium Nov 5, 2019
a09f8b9
added topology_groupmethods
lilyminium Nov 5, 2019
26cc234
reorganised formats, added new tables
lilyminium Nov 6, 2019
55350c9
removed txt files
lilyminium Nov 6, 2019
8b7ab34
updated gitignore
lilyminium Nov 6, 2019
eaca51d
added coordinate script
lilyminium Nov 6, 2019
93eb3c1
added guessers
lilyminium Nov 6, 2019
8e7b5bc
added more reference
lilyminium Nov 6, 2019
851ba67
added more formats
lilyminium Nov 7, 2019
50a133e
added all formats and reorganised
lilyminium Nov 8, 2019
42e4132
moved scripts to object-oriented
lilyminium Nov 9, 2019
4fe0e76
moved console python to ipython
lilyminium Nov 9, 2019
d2f0eef
added writing output
lilyminium Nov 9, 2019
45ea925
added pickle and alignments
lilyminium Nov 10, 2019
27d7106
fixed scripts
lilyminium Nov 12, 2019
b0587ac
added minimum MDA versions
lilyminium Nov 25, 2019
09b3989
removed glossary css
lilyminium Nov 25, 2019
0905911
fixed typo
lilyminium Nov 25, 2019
92caadf
removed example files
lilyminium Nov 25, 2019
f544cf2
removed file-generating ipython
lilyminium Nov 25, 2019
09320fe
fixed duplicate label
lilyminium Nov 25, 2019
88fc60c
added units to dlpoly
lilyminium Nov 25, 2019
3b3d885
fixed ipython highlighting, added script to run all scripts
lilyminium Dec 11, 2019
b6d3779
fixed typos
lilyminium Dec 12, 2019
b5eeff8
added contributing ref
lilyminium Dec 12, 2019
3b8f194
added default empty AG
lilyminium Dec 12, 2019
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
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,18 @@ doc/build
*.so

# Ignore generated docs
doc/source/scripts/generated/*
# *.txt

# ignore generated files
*.vmd
*.dcd
*.xyz
*.pdb
*.trr
*.ndx
*.xtc

# example files
doc/source/examples/*
!doc/source/examples/*.ipynb
!doc/source/examples/analysis/*.ipynb
20 changes: 17 additions & 3 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/* MDAnalysis gray: #808080 */
/* MDAnalysis white: #FFFFFF */
/* MDAnalysis black: #000000 */
/* Darker orange: e76900 */
/* Even darker orange: #a24900 */
/* Very light orange: #FFEBD0 */
Copy link
Member

Choose a reason for hiding this comment

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

Are these changes that need to be ported to the MDAnalysis docs, too?

/* Code orange: #ca6500 */
/* RTD dark grey: #343131 */
/* RTD light grey: #e6e6e6 */

Expand Down Expand Up @@ -203,4 +203,18 @@ dl.field-list > dt::after {

.rst-content code:not(.xref).literal {
color: #ca6500;
}
}
/* override table width restrictions */
@media screen and (min-width: 767px) {

.wy-table-responsive table td, .wy-table-responsive table th {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
overflow: visible !important;
max-width: 100% !important;
}
}
16 changes: 11 additions & 5 deletions doc/source/advanced_topology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Advanced topology concepts
.. _adding-residue-label:

Adding a Residue or Segment to a Universe
-----------------------------------------
=========================================

To add a :class:`~MDAnalysis.core.groups.Residue` or :code:`~MDAnalysis.core.groups.Segment` to a topology, use the :meth:`Universe.add_Residue <MDAnalysis.core.universe.Universe.add_Residue>` or :meth:`Universe.add_Segment <MDAnalysis.core.universe.Universe.add_Segment>` methods.
To add a :class:`~MDAnalysis.core.groups.Residue` or :class:`~MDAnalysis.core.groups.Segment` to a topology, use the :meth:`Universe.add_Residue <MDAnalysis.core.universe.Universe.add_Residue>` or :meth:`Universe.add_Segment <MDAnalysis.core.universe.Universe.add_Segment>` methods.

.. code-block::

Expand Down Expand Up @@ -39,7 +39,7 @@ Another example is `creating custom segments for protein domains <examples/const
.. _molecule-label:

Molecules
---------
=========

In MDAnalysis, a molecule is a GROMACS-only concept that is relevant in some analysis methods. A group of atoms is considered a "molecule" if it is defined by the :code:`[ moleculetype ]` section in a `GROMACS topology <http://manual.gromacs.org/documentation/2019/reference-manual/file-formats.html#top>`_. Molecules are only defined if a Universe is created from a GROMACS topology file (i.e. with a .tpr extension). Unlike fragments, they are not accessible directly from atoms.

Expand All @@ -53,9 +53,15 @@ In MDAnalysis, a molecule is a GROMACS-only concept that is relevant in some ana
cls=self.__class__.__name__, attr=attr))
AttributeError: AtomGroup has no attribute molecules

However, the order (:code:`molnum`) and name (:code:`moltype`) of each molecule is accessible as :ref:`topology attributes <topology-attributes>`::
However, the order (:code:`molnum`) and name (:code:`moltype`) of each molecule is accessible as :ref:`topology attributes <topology-attributes-label>`::

>>> tpr.atoms.molnums
array([ 0, 0, 0, ..., 11086, 11087, 11088])
>>> tpr.atoms.moltypes
array(['AKeco', 'AKeco', 'AKeco', ..., 'NA+', 'NA+', 'NA+'], dtype=object)
array(['AKeco', 'AKeco', 'AKeco', ..., 'NA+', 'NA+', 'NA+'], dtype=object)


.. _custom-topologyattrs-label:

Adding custom TopologyAttrs
===========================
39 changes: 37 additions & 2 deletions doc/source/analysis.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
.. -*- coding: utf-8 -*-
.. analysis:
.. _analysis-label:

=====================
Analysis
=====================
=====================


.. toctree::
:maxdepth: 1
:caption: Alignments, distances, and contacts

examples/analysis/alignments.ipynb

.. toctree::
:maxdepth: 1
:caption: Hydrogen bonding

.. toctree::
:maxdepth: 1
:caption: Dimensionality reduction

.. toctree::
:maxdepth: 1
:caption: Structure

.. toctree::
:maxdepth: 1
:caption: Volumetric analysis

.. toctree::
:maxdepth: 1
:caption: Membranes and membrane proteins

.. toctree::
:maxdepth: 1
:caption: Nucleic acids

.. toctree::
:maxdepth: 1
:caption: Polymers
Loading