Author: bugman
Date: Thu Nov 20 11:22:20 2014
New Revision: 26651
URL: http://svn.gna.org/viewcvs/relax?rev=26651&view=rev
Log:
Merged revisions 26642-26646,26648-26650 via svnmerge from
svn+ssh://[email protected]/svn/relax/trunk
........
r26642 | bugman | 2014-11-20 08:59:06 +0100 (Thu, 20 Nov 2014) | 5 lines
Updated the align_tensor.display user function to output the irreducible
spherical harmonic weights.
This is the alignment tensor in the {A-2, A-1, A0, A1, A2} notation.
........
r26643 | bugman | 2014-11-20 09:15:37 +0100 (Thu, 20 Nov 2014) | 5 lines
Expanded the 'irreducible 5D' text in the align_tensor.matrix_angles and
align_tensor.svd user functions.
This now explains that these are the coefficients for the spherical harmonic
decomposition.
........
r26644 | bugman | 2014-11-20 09:23:13 +0100 (Thu, 20 Nov 2014) | 3 lines
Improved the text for the irreducible tensor notation in the
align_tensor.display user function.
........
r26645 | bugman | 2014-11-20 09:27:21 +0100 (Thu, 20 Nov 2014) | 3 lines
Formatting fix for the magnetic susceptibility tensor part of the
align_tensor.display user function.
........
r26646 | bugman | 2014-11-20 09:53:10 +0100 (Thu, 20 Nov 2014) | 3 lines
More improvements for the align_tensor.matrix_angles user function
description.
........
r26648 | bugman | 2014-11-20 11:00:38 +0100 (Thu, 20 Nov 2014) | 3 lines
Epydoc docstring fixes and expansion for the lib.io.sort_filenames() function.
........
r26649 | bugman | 2014-11-20 11:03:31 +0100 (Thu, 20 Nov 2014) | 7 lines
Epydoc docstring fixes for the lib.spectrum.nmrpipe module.
This is for the API documentation at http://www.nmr-relax.com/api/index.html.
The
show_apod_rmsd_to_file() and show_apod_rmsd_dir_to_files() function
docstrings have both been
modified.
........
r26650 | bugman | 2014-11-20 11:08:22 +0100 (Thu, 20 Nov 2014) | 6 lines
Epydoc docstring fixes for the pipe_control.opendx.map() function.
This is for
http://www.nmr-relax.com/api/3.3/pipe_control.opendx-module.html#map. The
fixes include
whitespace and textwrapping changes.
........
Modified:
branches/frame_order_cleanup/ (props changed)
branches/frame_order_cleanup/lib/io.py
branches/frame_order_cleanup/lib/spectrum/nmrpipe.py
branches/frame_order_cleanup/pipe_control/align_tensor.py
branches/frame_order_cleanup/pipe_control/opendx.py
branches/frame_order_cleanup/user_functions/align_tensor.py
Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Nov 20 11:22:20 2014
@@ -1 +1 @@
-/trunk:1-26639
+/trunk:1-26650
Modified: branches/frame_order_cleanup/lib/io.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/io.py?rev=26651&r1=26650&r2=26651&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/io.py (original)
+++ branches/frame_order_cleanup/lib/io.py Thu Nov 20 11:22:20 2014
@@ -484,10 +484,12 @@
def sort_filenames(filenames=None, rev=False):
"""Sort the given list in alphanumeric order. Should be equivalent to
unix 'ls -n' command.
- @keyword filenames: The list of filenames
- @type l: list of strings
- @keyword rev: Flag, if the list should be reverted
- @type rev: boold
+ @keyword filenames: The list of file names to sort.
+ @type filenames: list of str
+ @keyword rev: Flag which if True will cause the list to be reversed.
+ @type rev: bool
+ @return: The sorted list of file names.
+ @rtype: list of str
"""
# Define function to convert to integers if text is digit.
Modified: branches/frame_order_cleanup/lib/spectrum/nmrpipe.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/spectrum/nmrpipe.py?rev=26651&r1=26650&r2=26651&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/spectrum/nmrpipe.py (original)
+++ branches/frame_order_cleanup/lib/spectrum/nmrpipe.py Thu Nov 20
11:22:20 2014
@@ -267,13 +267,13 @@
@keyword dir: The directory where the file is located.
@type dir: str
@keyword path_to_command: If showApod not in PATH, then specify absolute
path as: /path/to/showApod
- @type dir: str
+ @type path_to_command: str
@keyword outdir: The directory where to write the file. If
'None', then write in same directory.
@type outdir: str
@param force: Boolean argument which if True causes the file
to be overwritten if it already exists.
@type force: bool
- @return: Write the 'Noise Std Dev' from showApod to a
file with same file filename, with ending '.rmsd'.
- @rtype: filepath
+ @return: Write the 'Noise Std Dev' from showApod to a
file with same file filename, with ending '.rmsd'. This will be a file path.
+ @rtype: str
"""
# Call extract function.
@@ -318,13 +318,13 @@
@keyword dir: The directory where the files is located.
@type dir: str
@keyword path_to_command: If showApod not in PATH, then specify absolute
path as: /path/to/showApod
- @type dir: str
+ @type path_to_command: str
@keyword outdir: The directory where to write the files. If
'None', then write in same directory.
@type outdir: str
@param force: Boolean argument which if True causes the file
to be overwritten if it already exists.
@type force: bool
- @return: Write the 'Noise Std Dev' from showApod to a
file with same file filename, with ending '.rmsd'.
- @rtype: list of filepaths
+ @return: Write the 'Noise Std Dev' from showApod to a
file with same file filename, with ending '.rmsd'. This will be a list of file
paths.
+ @rtype: list of str
"""
# First get correct dir, no matter if dir is specified with or without
system folder separator.
Modified: branches/frame_order_cleanup/pipe_control/align_tensor.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/align_tensor.py?rev=26651&r1=26650&r2=26651&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/align_tensor.py (original)
+++ branches/frame_order_cleanup/pipe_control/align_tensor.py Thu Nov 20
11:22:20 2014
@@ -306,7 +306,7 @@
# No chi tensor.
if not chi_tensor:
- print("# The chi tensor:\nN/A.\n")
+ print("# The chi tensor:\nN/A.")
# Calculate the chi tensor.
else:
@@ -331,6 +331,25 @@
# 3D form.
print("# 3D, rank-2 notation.")
print("%s" % chi)
+
+
+ # The irreducible weights.
+ ##########################
+
+ subsection(file=sys.stdout, text="Irreducible spherical tensor
coefficients", prespace=2)
+
+ # The equations.
+ print("# The spherical harmonic decomposition weights are:")
+ print("# A0 = (4pi/5)^(1/2) Szz,")
+ print("# A+/-1 = +/- (8pi/15)^(1/2)(Sxz +/- iSyz),")
+ print("# A+/-2 = (2pi/15)^(1/2)(Sxx - Syy +/- 2iSxy).")
+
+ # The parameters.
+ print("A-2 = %25.12e %25.12ei" % (data.Am2.real, data.Am2.imag))
+ print("A-1 = %25.12e %25.12ei" % (data.Am1.real, data.Am1.imag))
+ print("A0 = %25.12e" % data.A0.real)
+ print("A1 = %25.12e %25.12ei" % (data.A1.real, data.A1.imag))
+ print("A2 = %25.12e %25.12ei" % (data.A2.real, data.A2.imag))
# The Eigensystem.
Modified: branches/frame_order_cleanup/pipe_control/opendx.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/opendx.py?rev=26651&r1=26650&r2=26651&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/opendx.py (original)
+++ branches/frame_order_cleanup/pipe_control/opendx.py Thu Nov 20 11:22:20 2014
@@ -37,29 +37,24 @@
from pipe_control import value
from specific_analyses.api import return_api
+
def map(params=None, map_type='Iso3D', spin_id=None, inc=20, lower=None,
upper=None, axis_incs=10, file_prefix="map", dir="dx", point=None,
point_file="point", chi_surface=None, create_par_file=False):
"""Map the space corresponding to the spin identifier and create the
OpenDX files.
- @keyword params:
- @type params:
+ @keyword params: The list of model parameters to map.
+ @type params: list of str
@keyword map_type: The type of map to create. The available
options are:
- 'Iso3D', a 3D isosurface visualisation
of the space.
@type map_type: str
@keyword spin_id: The spin identification string.
@type spin_id: str
- @keyword inc: The resolution of the plot. This is the
number of increments per
- dimension.
+ @keyword inc: The resolution of the plot. This is the
number of increments per dimension.
@type inc: int
- @keyword lower: The lower bounds of the space to map. If
supplied, this should be a
- list of floats, its length equal to the number
of parameters in the
- model.
+ @keyword lower: The lower bounds of the space to map. If
supplied, this should be a list of floats, its length equal to the number of
parameters in the model.
@type lower: None or list of float
- @keyword upper: The upper bounds of the space to map. If
supplied, this should be a
- list of floats, its length equal to the number
of parameters in the
- model.
+ @keyword upper: The upper bounds of the space to map. If
supplied, this should be a list of floats, its length equal to the number of
parameters in the model.
@type upper: None or list of float
- @keyword axis_incs: The number of tick marks to display in the
OpenDX plot in each
- dimension.
+ @keyword axis_incs: The number of tick marks to display in the
OpenDX plot in each dimension.
@type axis_incs: int
@keyword file_prefix: The file prefix for all the created files.
@type file_prefix: str
@@ -70,7 +65,7 @@
@keyword point_file: The file prefix for the point output files.
@type point_file: str or None
@keyword create_par_file: Whether to create a file with parameters and
associated chi2 value.
- @type point_file: bool
+ @type create_par_file: bool
"""
# Check the args.
Modified: branches/frame_order_cleanup/user_functions/align_tensor.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/user_functions/align_tensor.py?rev=26651&r1=26650&r2=26651&view=diff
==============================================================================
--- branches/frame_order_cleanup/user_functions/align_tensor.py (original)
+++ branches/frame_order_cleanup/user_functions/align_tensor.py Thu Nov 20
11:22:20 2014
@@ -341,9 +341,9 @@
)
# Description.
uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("This will calculate the inter-matrix angles between
all loaded alignment tensors for the current data pipe. For the vector basis
sets, the matrices are first converted to vector form and then then the
inter-vector angles rather than inter-matrix angles are calculated. The angles
are dependent upon the basis set - linear maps produce identical results
whereas non-linear maps result in different angles. The basis set can be one
of:")
+uf.desc[-1].add_paragraph("This will calculate the inter-matrix angles between
all loaded alignment tensors for the current data pipe. For the vector basis
sets, the matrices are first mapped to vector form and then then the
inter-vector angles rather than inter-matrix angles are calculated. The angles
are dependent upon the basis set - linear maps produce identical results
whereas non-linear maps result in different angles. The basis set can be one
of:")
uf.desc[-1].add_item_list_element("'matrix'", "The standard inter-matrix
angles. This default option is a linear map, hence angles are preserved. The
angle is calculated via the arccos of the Euclidean inner product of the
alignment matrices in rank-2, 3D form divided by the Frobenius norm ||A||_F of
the matrices.")
-uf.desc[-1].add_item_list_element("'irreducible 5D'", "The inter-tensor vector
angles for the irreducible 5D basis set {A-2, A-1, A0, A1, A2}. This is a
linear map, hence angles are preserved.")
+uf.desc[-1].add_item_list_element("'irreducible 5D'", "The inter-tensor vector
angles for the irreducible spherical tensor 5D basis set {A-2, A-1, A0, A1,
A2}. This is a linear map, hence angles are preserved. These are the
spherical harmonic decomposition coefficients.")
uf.desc[-1].add_item_list_element("'unitary 9D'", "The inter-tensor vector
angles for the unitary 9D basis set {Sxx, Sxy, Sxz, Syx, Syy, Syz, Szx, Szy,
Szz}. This is a linear map, hence angles are preserved.")
uf.desc[-1].add_item_list_element("'unitary 5D'", "The inter-tensor vector
angles for the unitary 5D basis set {Sxx, Syy, Sxy, Sxz, Syz}. This is a
non-linear map, hence angles are not preserved.")
uf.desc[-1].add_item_list_element("'geometric 5D'", "The inter-tensor vector
angles for the geometric 5D basis set {Szz, Sxxyy, Sxy, Sxz, Syz}. This is a
non-linear map, hence angles are not preserved. This is also the Pales
standard notation.")
@@ -351,9 +351,9 @@
uf.desc[-1].add_verbatim("""\
/ <A1 , A2> \
theta = arccos | ------------- | ,
- \ ||A1|| ||A2|| / \
-""")
-uf.desc[-1].add_paragraph("where <a,b> is the Euclidean inner product and
||a|| is the Frobenius norm of the matrix. For the irreducible 5D basis set,
the Am components are defined as")
+ \ ||A1||.||A2|| / \
+""")
+uf.desc[-1].add_paragraph("where <a,b> is the Euclidean inner product and
||a|| is the Frobenius norm of the matrix. For the irreducible spherical
tensor 5D basis set, the Am components are defined as")
uf.desc[-1].add_verbatim("""\
/ 4pi \ 1/2
A0 = | --- | Szz ,
@@ -369,7 +369,9 @@
""")
uf.desc[-1].add_paragraph("and, for this complex notation, the angle is")
uf.desc[-1].add_verbatim("""\
- theta = arccos(Re(<A1|A2>) / (|A1|.|A2|)) , \
+ / Re(<A1|A2>) \
+ theta = arccos | ----------- | ,
+ \ |A1|.|A2| / \
""")
uf.desc[-1].add_paragraph("where the inner product is defined as")
uf.desc[-1].add_verbatim("""\
@@ -379,7 +381,13 @@
/__
m=-2,2 \
""")
-uf.desc[-1].add_paragraph("and where Am* = (-1)^m A-m, and the norm is defined
as |A1| = Re(sqrt(<A1|A1>)).")
+uf.desc[-1].add_paragraph("and where Am* = (-1)^m A-m, and the norm is defined
as |A1| = Re(sqrt(<A1|A1>)). For all other basis sets whereby the map is real
matrix -> real vector, the inter-tensor angle is defined as")
+uf.desc[-1].add_verbatim("""\
+ / <A1|A2> \
+ theta = arccos | --------- | ,
+ \ |A1|.|A2| / \
+""")
+uf.desc[-1].add_paragraph("where the inner product <A1|A2> is simply the
vector dot product and |A1| is the vector length.")
uf.backend = align_tensor.matrix_angles
uf.menu_text = "&matrix_angles"
uf.gui_icon = "oxygen.categories.applications-education"
@@ -491,7 +499,7 @@
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will perform a singular value decomposition
for all alignment tensors and calculate the condition number. The singular
values and condition number are dependent on the basis set - linear maps
produce identical results whereas non-linear maps result in different values.
The basis set can be one of:")
-uf.desc[-1].add_item_list_element("'irreducible 5D'", "The irreducible 5D
basis set {A-2, A-1, A0, A1, A2}. This is a linear map, hence angles, singular
values, and condition number are preserved.")
+uf.desc[-1].add_item_list_element("'irreducible 5D'", "The irreducible
spherical tensor 5D basis set {A-2, A-1, A0, A1, A2}. This is a linear map,
hence angles, singular values, and condition number are preserved. These are
the spherical harmonic decomposition coefficients.")
uf.desc[-1].add_item_list_element("'unitary 9D'", "The unitary 9D basis set
{Sxx, Sxy, Sxz, Syx, Syy, Syz, Szx, Szy, Szz}. This is a linear map, hence
angles, singular values, and condition number are preserved.")
uf.desc[-1].add_item_list_element("'unitary 5D'", "The unitary 5D basis set
{Sxx, Syy, Sxy, Sxz, Syz}. This is a non-linear map, hence angles, singular
values, and condition number are not preserved.")
uf.desc[-1].add_item_list_element("'geometric 5D'", "The geometric 5D basis
set {Szz, Sxxyy, Sxy, Sxz, Syz}. This is a non-linear map, hence angles,
singular values, and condition number are not preserved. This is also the
Pales standard notation.")
@@ -535,7 +543,7 @@
| . . . . . |
| SzzN SxxyyN SxyN SxzN SyzN |\
""")
-uf.desc[-1].add_paragraph("For the irreducible basis set, the Am components
are defined as")
+uf.desc[-1].add_paragraph("For the irreducible spherical tensor basis set, the
Am components are defined as")
uf.desc[-1].add_verbatim("""\
/ 4pi \ 1/2
A0 = | --- | Szz ,
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits