Difference between revisions of "Ipcs.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Solves the inverse problem for pseudocontact shift by recovering the source term in the Kuprov equation using Tikhonov + maximum entropy regularization procedure. Syntax: ...")
 
(Update function See also links and function index membership)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
−
Solves the inverse problem for pseudocontact shift by recovering the
+
{{DISPLAYTITLE:ipcs.m}} __NOTOC__
−
source term in the Kuprov equation using Tikhonov + maximum entropy
+
3D reconstruction of paramagnetic centre probability density from PCS data using the Kuprov-Charnock equation (http://dx.doi.org/10.1039/C4CP03106G); the user supplies atomic coordinates and pseudocontact shifts, the algorithm uses Tikhonov regularisation, and in the parameter descriptions below "source" denotes the paramagnetic-centre probability density that generates the pseudocontact shift, while "solution" denotes the pseudocontact shift itself.
−
regularization procedure. Syntax:
 
  
−
    [source_cube,ranges,pred_pcs,diag_data]=...
+
==Syntax==
−
                  ipcs(nxyz,expt_pcs,chi,npoints,lambda,margins)
 
  
−
Parameters:
+
    [source_cube,ranges,pred_pcs,err_ls,reg_a,reg_b]=ipcs(parameters,npoints,lambda)
  
−
    nxyz    - nuclear coordinates as [x y z] with multiple rows
+
==Parameters== 
−
                at which PCS has been measured, in Angstroms.
 
  
−
     expt_pcs - pseudocontact shift in ppm at each nucleus.
+
     parameters.xyz      - nuclear coordinates as [x y z] with multiple rows
−
 
+
                          at which PCS has been measured, in Angstrom.
−
     chi      - electron magnetic susceptibility tensor, in units
+
−
                of Angstrom^3.
+
    parameters.xyz_all  - atomic coordinates as [x y z] with multiple rows
−
 
+
                          for all atoms in the structure, in Angstrom.
−
     npoints - number of points in each dimension of the source
+
−
                cube, a positive integer greater than 10.
+
    parameters.expt_pcs - pseudocontact shift in ppm at each nucleus.
−
 
+
−
     lambda   - regularization parameters, the first element is
+
     parameters.chi      - effective magnetic susceptibility tensor, in units
−
                the coefficient in front of the maximum entropy
+
                          of Angstrom^3.
−
                term and the second element is the coefficient in
+
−
                front of the Tikhonov term.
+
     parameters.margins  - a six-element vector specifying margins to take
−
 
+
                          around the bounding box of the nuclear coordina-
−
     margins  - a six-element vector specifying margins to take
+
                          tes supplied, to eliminate the effects of the
−
                around the bounding box of the nuclear coordina-
+
                          periodic boundary conditions.
−
                tes supplied, to account for the possibility that
+
   
−
                the electron may be located on the periphery.
+
    parameters.box_cent - Cartesian coordinates of the centre of the source
 +
                          box, in Angstrom
 +
 +
    parameters.box_size - size of the source box in X, Y, and Z directions,
 +
                          in Angstrom
 +
 +
     parameters.plot    - a cell array of strings specifying the plotting
 +
                          options at each iteration:
 +
 +
                            'diagnostics' - diagnostic output
 +
 +
                            'density'    - probability density
 +
 +
                            'molecule'    - molecular structure
 +
 +
                            'tightzoom'   - zooms the plot to the
 +
                                            molecular bounding box
 +
 +
                            'box'        - source box
 +
 +
    parameters.confine  - source confinement radii (a two-element vector
 +
                          in Angstrom). The density would only be varied
 +
                          in points that are no closer than the first ra-
 +
                          dius to any atom and no further away than the  
 +
                          second radius from the nearest atom.
 +
 +
    parameters.sharpen  - source contrast control; leave at zero unless
 +
                          you know what you are doing.
 +
 +
     parameters.guess    - optional initial guess for the source density.
 +
                          If this is supplied on a different grid from
 +
                          the current one, it will be resampled by cubic
 +
                          interpolation
 +
 +
    parameters.equation - 'poisson' to recover the right hand side of the
 +
                          Poisson's equation, 'kuprov' to recover the
 +
                          probability density.
 +
 +
    parameters.gpu      - set to 1 of you have an NVidia GPU, otherwise
 +
                          set to 0.
 +
 +
    npoints            - number of grid points in each dimension of the
 +
                          solution cube, a positive integer; at least 64
 +
                          is recommended.
 +
 +
    lambda              - Tikhonov regularization parameter; start with 1,
 +
                          then use [[lcurve.m]] function to determine it
 +
                          more precisely
  
−
Outputs:
+
==Returns==
 
   
 
   
 
     source_cube - source term cube with dimensions ordered as
 
     source_cube - source term cube with dimensions ordered as
 
                   [X Y Z].
 
                   [X Y Z].
−
 
+
 
     ranges      - Cartesian axis extents for the source cube as
 
     ranges      - Cartesian axis extents for the source cube as
 
                   [xmin xmax ymin ymax zmin zmax] in Angstroms.
 
                   [xmin xmax ymin ymax zmin zmax] in Angstroms.
−
 
+
 
     pred_pcs    - pseudocontact shifts produced by the source
 
     pred_pcs    - pseudocontact shifts produced by the source
 
                   cube returned in the first parameter.
 
                   cube returned in the first parameter.
 +
 +
    err_ls      - least squares penalty of the final source cube
 +
 +
    reg_a      - contrast penalty of the final source cube
 +
 +
    reg_b      - Tikhonov penalty of the final source cube
 +
 +
==Examples==
 +
See the pseudocontact shift analysis [[Pseudocontact_shift_analysis|tutorial]] and the examples in nmr_paramag directory of the standard example set supplied with ''Spinach''.
 +
 +
==Notes==
 +
For further information on the equations and algorithms used in this function see http://dx.doi.org/10.1039/C4CP03106G
  
−
    diag_data  - the first element is the least squares error
+
==See also==
−
                  in ppm^2, the second element is the entropy
+
[[ppcs.m]], [[kpcs.m]], [[ippcs.m]], [[ilpcs.m]], [[lpcs.m]], [[lcurve.m]], [[centroid.m]], [[csa2racs.m]], [[eqmag.m]], [[fieldscan_enlev.m]], [[fieldscan_magn.m]], [[geffect.m]], [[hfc2pcs.m]], [[hfc2pms.m]], [[pcs2chi.m]], [[pcs_combi_fit.m]], [[pms2chi.m]], [[probmax.m]], [[Built-in_experiments]], [[Hyperfine_shift_module]]
−
                  penalty in the error functional, the third
 
−
                  element is the tikhonov penalty in the error
 
−
                  functional.
 
  
−
Note: for further information on the equations and algorithms used
+
''Version 1.9, authors: [[Elizaveta Suturina]], [[Gareth Charnock]], [[Ilya Kuprov]]''
−
in this function see http://dx.doi.org/10.1039/C4CP03106G
 

Latest revision as of 18:38, 6 June 2026

3D reconstruction of paramagnetic centre probability density from PCS data using the Kuprov-Charnock equation (http://dx.doi.org/10.1039/C4CP03106G); the user supplies atomic coordinates and pseudocontact shifts, the algorithm uses Tikhonov regularisation, and in the parameter descriptions below "source" denotes the paramagnetic-centre probability density that generates the pseudocontact shift, while "solution" denotes the pseudocontact shift itself.

Syntax

    [source_cube,ranges,pred_pcs,err_ls,reg_a,reg_b]=ipcs(parameters,npoints,lambda)

Parameters

    parameters.xyz      - nuclear coordinates as [x y z] with multiple rows 
                          at which PCS has been measured, in Angstrom.

    parameters.xyz_all  - atomic coordinates as [x y z] with multiple rows 
                          for all atoms in the structure, in Angstrom.

    parameters.expt_pcs - pseudocontact shift in ppm at each nucleus.

    parameters.chi      - effective magnetic susceptibility tensor, in units
                          of Angstrom^3.

    parameters.margins  - a six-element vector specifying margins to take
                          around the bounding box of the nuclear coordina-
                          tes supplied, to eliminate the effects of the 
                          periodic boundary conditions.

    parameters.box_cent - Cartesian coordinates of the centre of the source
                          box, in Angstrom

    parameters.box_size - size of the source box in X, Y, and Z directions,
                          in Angstrom

    parameters.plot     - a cell array of strings specifying the plotting
                          options at each iteration:

                            'diagnostics' - diagnostic output

                            'density'     - probability density

                            'molecule'    - molecular structure

                            'tightzoom'   - zooms the plot to the
                                            molecular bounding box

                            'box'         - source box

    parameters.confine  - source confinement radii (a two-element vector
                          in Angstrom). The density would only be varied
                          in points that are no closer than the first ra-
                          dius to any atom and no further away than the 
                          second radius from the nearest atom.

    parameters.sharpen  - source contrast control; leave at zero unless
                          you know what you are doing.

    parameters.guess    - optional initial guess for the source density.
                          If this is supplied on a different grid from 
                          the current one, it will be resampled by cubic
                          interpolation

    parameters.equation - 'poisson' to recover the right hand side of the
                          Poisson's equation, 'kuprov' to recover the
                          probability density.

    parameters.gpu      - set to 1 of you have an NVidia GPU, otherwise
                          set to 0.

    npoints             - number of grid points in each dimension of the
                          solution cube, a positive integer; at least 64
                          is recommended.

    lambda              - Tikhonov regularization parameter; start with 1,
                          then use lcurve.m function to determine it 
                          more precisely

Returns

    source_cube - source term cube with dimensions ordered as
                  [X Y Z].

    ranges      - Cartesian axis extents for the source cube as
                  [xmin xmax ymin ymax zmin zmax] in Angstroms.

    pred_pcs    - pseudocontact shifts produced by the source
                  cube returned in the first parameter.

    err_ls      - least squares penalty of the final source cube

    reg_a       - contrast penalty of the final source cube

    reg_b       - Tikhonov penalty of the final source cube

Examples

See the pseudocontact shift analysis tutorial and the examples in nmr_paramag directory of the standard example set supplied with Spinach.

Notes

For further information on the equations and algorithms used in this function see http://dx.doi.org/10.1039/C4CP03106G

See also

ppcs.m, kpcs.m, ippcs.m, ilpcs.m, lpcs.m, lcurve.m, centroid.m, csa2racs.m, eqmag.m, fieldscan_enlev.m, fieldscan_magn.m, geffect.m, hfc2pcs.m, hfc2pms.m, pcs2chi.m, pcs_combi_fit.m, pms2chi.m, probmax.m, Built-in_experiments, Hyperfine_shift_module

Version 1.9, authors: Elizaveta Suturina, Gareth Charnock, Ilya Kuprov