Skip to content

Commit

Permalink
Update manual
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcarreras committed Dec 21, 2020
1 parent 2868f7b commit d1c6a4f
Show file tree
Hide file tree
Showing 25 changed files with 67 additions and 28 deletions.
7 changes: 7 additions & 0 deletions cosymlib/shape/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ def _get_key(central_atom, reference, fix_permutation=False, reference_2=''):


class Shape:
"""
Shape class
:param geometry:
"""
def __init__(self, geometry):


# Allow geometry or molecule to be imported instead of crude Cartesian coordinates
try:
self._coordinates = geometry.get_positions()
Expand All @@ -39,6 +45,7 @@ def __init__(self, geometry):
self._path_deviation = {}
self._gen_coord = {}


# Function description
def measure(self, reference, central_atom=0, fix_permutation=False):
key = _get_key(central_atom, reference, fix_permutation=fix_permutation)
Expand Down
12 changes: 12 additions & 0 deletions cosymlib/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ def _get_key_wfnsym(group, vector_axis1, vector_axis2, center, alpha_occupancy,


class Symmetry:
"""
Symmetry class
:param structure:
:param central_atom:
:param center:
:param connect_thresh:
:param multi:
:param axis:
:param axis2:
"""

def __init__(self,
structure,
central_atom=0,
Expand Down
16 changes: 16 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
API Reference
=============
.. automodule:: cosymlib
:members: Cosymlib

Symmetry
--------
.. automodule:: cosymlib.symmetry
:members: Symmetry


Shape
-----
.. automodule:: cosymlib.shape
:members: Shape

16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages']
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages']


# Add any paths that contain templates here, relative to this directory.
Expand All @@ -51,8 +51,8 @@

# General information about the project.
project = u'cosymlib'
copyright = u'2017, Efrem & Abel'
author = u'Efrem & Abel'
copyright = u'2017, E. Bernuz, A. Carreras, M. Llunell & P. Alemany'
author = u'E. Bernuz, A. Carreras, M. Llunell & P. Alemany'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -82,7 +82,7 @@
todo_include_todos = False


autodoc_mock_imports = ['cosymlib.molecule']
autodoc_mock_imports = ['cosymlib.molecule, cosymlib.shape', 'wfnsympy', 'symgroupy']

# -- Options for HTML output ----------------------------------------------

Expand Down Expand Up @@ -152,7 +152,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'cosymlib.tex', u'cosymlib Documentation',
u'Efrem \\& Abel', 'manual'),
u'E. Bernuz, A. Carreras, M. Llunell & P. Alemany', 'manual'),
]


Expand Down
2 changes: 1 addition & 1 deletion docs/cosym.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Executing program
=================

This script run symeess from terminal
This script run cosymlib from terminal

.. module:: scripts/cosym

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
11 changes: 6 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. highlight:: rst

.. image:: ml8.png
.. image:: images/ml8.png
:height: 80px
:align: left

Expand Down Expand Up @@ -39,26 +39,27 @@ The basic tasks included in the current version of **cosymlib** are:
usage
tutorials
links
api

**Cosymlib** is being developed by the **Electronic Structure & Symmetry (ESS)** group
at the Department de Ciència de Material i Química Física
and the Institut de Química Teòrica i Computacional (IQTCUB). University of Barcelona.

------

.. image:: logo-ess.tiff
.. image:: images/logo-ess.tiff
:height: 52px
:align: left

.. image:: logo_ub.jpg
.. image:: images/logo_ub.jpg
:height: 52px
:align: left

.. image:: logo_iqtc.png
.. image:: images/logo_iqtc.png
:height: 52px
:align: left

.. image:: logo_mmaeztu.png
.. image:: images/logo_mmaeztu.png
:height: 52px
:align: left

Expand Down
16 changes: 8 additions & 8 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In a nutshell, the continuous shape measure S\ :sub:`P`\ (Q) of object Q with re
reference shape P is an indicator of how much Q resembles another object P\ :sub:`0`\ with a given
ideal shape, for instance a square as in the figure below.

.. image:: CShM_def.png
.. image:: images/CShM_def.png
:height: 160px
:align: center

Expand All @@ -48,7 +48,7 @@ Q and P, where P is the image of P\ :sub:`0`\ after these transformations.
If both the problem and the reference structures Q and P are defined as a set of vertices, we can
define the shape measure simply as:

.. image:: CShM_eq.png
.. image:: images/CShM_eq.png
:height: 105px
:align: center

Expand Down Expand Up @@ -100,7 +100,7 @@ with respect to a given point symmetry group G, denoted as S\ :sub:`G`\ (Q), yie
totally analogous to the equation above, in which Q refers again to the problem structure,
but where P is now the G-symmetric structure closest to Q:

.. image:: CSM_eq.png
.. image:: images/CSM_eq.png
:height: 90px
:align: center

Expand All @@ -118,7 +118,7 @@ optimal overlap of our quadrangle Q with a particular rectangle P as in a shape
to consider also which is the ratio between the side lengths of best matching rectangle and
optimize also with respect to this parameter.

.. image:: CSM_def.png
.. image:: images/CSM_def.png
:height: 180px
:align: center

Expand Down Expand Up @@ -167,7 +167,7 @@ prominent role in chemistry. A chiral object is usually described as an object t
superposed with its mirror image. In this sense, we could obtain a continuous chirality measure
by using the same equation as for shape measures just by replacing P by the mirror image of Q.

.. image:: CCM_def.png
.. image:: images/CCM_def.png
:height: 150px
:align: center

Expand Down Expand Up @@ -208,7 +208,7 @@ continuous symmetry and shape measures to more complex objects that cannot be si
by a set of vertices such as matrices or functions. In this case the definition of the continuous
symmetry measure is:

.. image:: QCSM_eq.png
.. image:: images/QCSM_eq.png
:height: 60px
:align: center

Expand All @@ -220,7 +220,7 @@ h symmetry operations g\ :sub:`i`\ that form group G. The precise definition on
overlaps depends, of course, on the nature of the object Q. For molecular orbitals as obtained in
a quantum chemical calculation we have:

.. image:: soev_eq.png
.. image:: images/soev_eq.png
:height: 40px
:align: center

Expand All @@ -230,7 +230,7 @@ wavefunction) by the whole electron density. Using this type of symmetry measure
to compare the symmetry contents of the electronic structure of molecules, for instance by comparing
the inversion symmetry measure for different diatomic molecules as in the example below:

.. image:: QCSM_example.png
.. image:: images/QCSM_example.png
:height: 150px
:align: center

Expand Down
2 changes: 1 addition & 1 deletion docs/shape.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is the shape module

shape_references

.. automodule:: symeess.shape
.. automodule:: cosymlib.shape
:members:
:show-inheritance:

Expand Down
13 changes: 8 additions & 5 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ x, y, z for each atom (vertex) in the structure.
``fname.xyz`` files read by shape may contain a single structure as in the previous example or
multiple structures (all with the same number of atoms), in which case a block:
::

Title
label1 x y z
...
Expand All @@ -124,6 +125,7 @@ file formats)*.
The basic call to the shape script must provide the the file containing the input structure and the
reference shape with respect to which the shape measure is calculated.
::

$ shape input_file -m SH

where ``input_file`` is a file containing the structural information in a valid format, for instance
Expand Down Expand Up @@ -241,6 +243,7 @@ Using

we find:
::

Available reference structures with 7 Vertices:

Label Sym Info
Expand Down Expand Up @@ -268,6 +271,7 @@ Note also that, as shown in this example, the position of the ``-c N`` and
``-m OC-6`` flags, or the ``input_file`` in the call to the shape script is totally irrelevant
and any combination such as:
::

$ shape cocl6.xyz -c 1 -m OC-6

$ shape -c 1 -m OC-6 cocl6.xyz
Expand All @@ -285,6 +289,7 @@ call.
Let us consider a ``struct.xyz`` file containing the geometry for an approximately square
H\ :sub:`4`\ molecule.
::

4
H4 Quadrangle
H 1.1 0.9 0.0
Expand All @@ -300,6 +305,7 @@ is the closest square to its actual distorted structure we may use:

which will yield:
::

Starting...
----------------------------------------------------------------------
COSYM v0.7.4
Expand Down Expand Up @@ -329,7 +335,7 @@ with the coordinates of the problem structure and its closest ideal (square)
structure, which we can use to plot the superposition of problem structure (in red)
and the ideal reference (in blue):

.. image:: quadr.png
.. image:: images/quadr.png
:height: 220 px
:align: center

Expand Down Expand Up @@ -435,7 +441,7 @@ our previous ``SHAPE`` program. Follow the link below for a pdf version of the
SHAPE ver. 2.1 where you will find all information to perform a continuous shape analysis using
this option.

:download: `SHAPE ver. 2.1 User's guide. <User_Manual_SHAPE_v2.1.pdf>`_
:download:`SHAPE ver. 2.1 User's guide <downloads/manual_shape_2_1.pdf>`



Expand Down Expand Up @@ -481,10 +487,7 @@ qqqqq

Using cosymlib's APIs
---------------------

qqqqq

--------



0 comments on commit d1c6a4f

Please sign in to comment.