Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcello-Sega committed Aug 6, 2024
1 parent fe002fa commit 958a345
Show file tree
Hide file tree
Showing 27 changed files with 98 additions and 82 deletions.
Binary file modified docs/build/doctrees/GITIM.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/ITIM.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/WillardChandler.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/center.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/datafiles.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/guessing_radii.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/install.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/micelle.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/newproperties.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/observables.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/quick.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/utilities.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3e858e989338fd2a40611e7ee8fa6d30
config: 7c4c1f3fa5e49d93b36383534dd7deec
tags: 645f666f9bcd5a90fca523b33c5a78b7
21 changes: 12 additions & 9 deletions docs/build/html/_sources/newproperties.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ New properties of Atoms

Summary
-------
Pytim adds some new properties to the :class:`Atoms` class of :obj:`MDAnalysis`.
:doc:`Pytim <quick>` adds some new properties to the :class:`Atoms` class of MDAnalysis_.

.. _MDAnalysis: http://www.mdanalysis.org/

This tutorial shows what they are and how to used them.

Expand All @@ -21,12 +23,12 @@ and :class:`~pytim.gitim.GITIM`, but not for
are added to all atoms in the universe: :obj:`layers`, :obj:`clusters`
and, in case of :class:`~pytim.itim.ITIM`, also :obj:`sides`.

Note that, differently from what happens in :obj:`MDAnalysys`, also some of the standard properties (e.g. :obj:`radii`, :obj:`tempfactors`, :obj:`bfactors`, :obj:`elements`) will *always* be associated to the atoms, *even if* the information is not present in the configuration file/trajectory (some heuristics is used by pytim to guess their values)
Note that, differently from what happens in MDAnalysis_, also some of the standard properties (e.g. :obj:`radii`, :obj:`tempfactors`, :obj:`bfactors`, :obj:`elements`) will *always* be associated to the atoms, *even if* the information is not present in the configuration file/trajectory (some heuristics is used by :doc:`Pytim <quick>` to guess their values)

Layers
------

The value of `atoms.layers` can be either -1 (atom not in any of the layers) or 1, 2, 3,..., :obj:`max_layers`
The value of :py:obj:`atoms.layers` can be either -1 (atom not in any of the layers) or 1, 2, 3,..., :obj:`max_layers`

>>> import numpy as np
>>> import MDAnalysis as mda
Expand All @@ -36,7 +38,8 @@ The value of `atoms.layers` can be either -1 (atom not in any of the layers) or
>>> u = mda.Universe(WATER_GRO)
>>> g = u.select_atoms('name OW')
>>> inter = pytim.ITIM(u,group=g,max_layers=3)
>>> print np.unique(u.atoms.layers)
>>> print (np.unique(u.atoms.layers))
[-1 1 2 3]

This property can be used to select a particular subset of atoms, e.g.

Expand All @@ -49,7 +52,7 @@ This property can be used to select a particular subset of atoms, e.g.
Clusters
--------

The value of `atoms.clusters` can be -1 if the atom is not in a
The value of :py:obj:`atoms.clusters` can be -1 if the atom is not in a
cluster (or not in the group for which the cluster search is
performed) or 0,1,... if it belongs to the largest cluster,
second-to-largest cluster, and so on, respectively.
Expand All @@ -63,21 +66,21 @@ according to the cluster they belong when calling:
>>> import numpy as np
>>> u = mda.Universe(ILBENZENE_GRO)
>>> g = u.select_atoms('resname LIG')
>>> inter = pytim.ITIM(u,group=g,cluster_cut=7.5,cluster_threshold_density='auto')
>>> inter = pytim.ITIM(u,group=g,cluster_cut=7.5,cluster_threshold_density='auto',normal=2)
>>> np.sum(g.clusters==0)
19200
>>> np.sum(g.clusters==1)
372
>>> np.sum(g.clusters==2)
264
>>> np.sum(g.clusters==3) # no more clusters...
0
>>> # the remaining benzene molecues are not clustering
0
>>> # the remaining benzene molecues are not clustering
>>> # (i.e., isolated according to the criterion chosen)
>>> np.sum(g.clusters==-1)
10164

The option :option:`tempfactors` of :func:`~pytim.Interface.writepdb`
The option :obj:`tempfactors` of :meth:`~pytim.itim.ITIM.writepdb`
can be used to save to a pdb file, instead of the information about
the layers (default), the cluster labels:

Expand Down
13 changes: 9 additions & 4 deletions docs/build/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.7.0',
LANGUAGE: 'None',
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.0.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};
144 changes: 76 additions & 68 deletions docs/build/html/newproperties.html

Large diffs are not rendered by default.

Binary file modified docs/build/plot_directive/observables-1.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/plot_directive/observables-1.pdf
Binary file not shown.
Binary file modified docs/build/plot_directive/observables-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/plot_directive/observables-2.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/plot_directive/observables-2.pdf
Binary file not shown.
Binary file modified docs/build/plot_directive/observables-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/plot_directive/utilities-1.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/plot_directive/utilities-1.pdf
Binary file not shown.
Binary file modified docs/build/plot_directive/utilities-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 958a345

Please sign in to comment.