plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
sanghosuh/lens_nmf-matlab-master
compute_total_doc_cvrg.m
.m
lens_nmf-matlab-master/evaluation/total_document_coverage/compute_total_doc_cvrg.m
3,754
utf_8
04b200587eeed0ab2478d94ed634045a
% Total Document Coverage % % Written by Sangho Suh (sh31659@gmail.com) % Dept. of Computer Science and Engineering, % Korea University % % Reference: % % [1] Sangho Suh, Jaegul Choo, Joonseok Lee and Chandan K. Reddy. % L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative ...
github
sanghosuh/lens_nmf-matlab-master
weakorthonmf.m
.m
lens_nmf-matlab-master/library/ramkis/weakorthonmf.m
33,961
utf_8
35a6c05d74c3570a95b513b216f63769
% Weakly Orthogonal Nonnegative Matrix Factorization % % Written by Jaegul Choo (jchoo@korea.ac.kr) % Dept. of Computer Science and Engineering, % Korea University % % Please send bug reports, comments, or questions to Jingu Kim. % This code comes with no guarantee or warranty of any kind. % % Ref...
github
sanghosuh/lens_nmf-matlab-master
fcnnls.m
.m
lens_nmf-matlab-master/library/nmf/fcnnls.m
4,407
utf_8
b1a8ecaaeeec231beb8a0a043366505e
% M. H. Van Benthem and M. R. Keenan, J. Chemometrics 2004; 18: 441-450 % % Given A and C this algorithm solves for the optimal % K in a least squares sense, using that % A = C*K % in the problem % min ||A-C*K||, s.t. K>=0, for given A and C. % function [K, Pset, many_iter] = fcnnls(C, A) % NNLS using norma...
github
sanghosuh/lens_nmf-matlab-master
nmfsh_comb_original.m
.m
lens_nmf-matlab-master/library/nmf/nmfsh_comb_original.m
4,989
utf_8
033ed6a9348041d0caab80dc5834ee2b
% % SNMF/R % % Author: Hyunsoo Kim and Haesun Park, Georgia Insitute of Technology % % Reference: % % Sparse Non-negative Matrix Factorizations via Alternating % Non-negativity-constrained Least Squares for Microarray Data Analysis % Hyunsoo Kim and Haesun Park, Bioinformatics, 2007, to appear. % % This software ...
github
sanghosuh/lens_nmf-matlab-master
nmf.m
.m
lens_nmf-matlab-master/library/nmf/nmf.m
25,072
utf_8
6ff4cbae3d1bff8b4c05b0a8a3485728
% Nonnegative Matrix Factorization : Algorithms Toolbox % % Written by Jingu Kim (jingu.kim@gmail.com) % School of Computational Science and Engineering, % Georgia Institute of Technology % % Please send bug reports, comments, or questions to Jingu Kim. % This code comes with no guarantee or warra...
github
sanghosuh/lens_nmf-matlab-master
nnlsm_blockpivot.m
.m
lens_nmf-matlab-master/library/nmf/nnlsm_blockpivot.m
4,547
utf_8
f7cbdd610f2388c434a4444f43bdc3f2
% Nonnegativity Constrained Least Squares with Multiple Righthand Sides % using Block Principal Pivoting method % % This software solves the following problem: given A and B, find X such that % minimize || AX-B ||_F^2 where X>=0 elementwise. % % Reference: % Jingu Kim and Haesun Park, Toward Fas...
github
sanghosuh/lens_nmf-matlab-master
nmfsh_comb.m
.m
lens_nmf-matlab-master/library/nmf/nmfsh_comb.m
4,550
utf_8
256156e36e548ecf054efe5ef6c2a532
% % SNMF/R % % Author: Hyunsoo Kim and Haesun Park, Georgia Insitute of Technology % % Reference: % % Sparse Non-negative Matrix Factorizations via Alternating % Non-negativity-constrained Least Squares for Microarray Data Analysis % Hyunsoo Kim and Haesun Park, Bioinformatics, 2007, to appear. % % This software ...
github
sanghosuh/lens_nmf-matlab-master
nnlsm_activeset.m
.m
lens_nmf-matlab-master/library/nmf/nnlsm_activeset.m
5,020
utf_8
5d51124cecf5c37d8ab6c1ec91dbad32
% Nonnegativity Constrained Least Squares with Multiple Righthand Sides % using Active Set method % % This software solves the following problem: given A and B, find X such that % minimize || AX-B ||_F^2 where X>=0 elementwise. % % Reference: % Charles L. Lawson and Richard J. Hanson, Solving Leas...
github
sanghosuh/lens_nmf-matlab-master
lens_nmf.m
.m
lens_nmf-matlab-master/library/lens_nmf/lens_nmf.m
3,937
utf_8
5cbdf2fafe4b052a4903068efafbcbf4
% Localizd Ensemble of Nonnegative Matrix Factorization (L-EnsNMF) % % Written by Sangho Suh (sh31659@gmail.com) % Dept. of Computer Science and Engineering, % Korea University % % Reference: % % [1] Sangho Suh et al. % Boosted L-EnsNMF: Local Topic Discovery via Ensemble of Nonnegative Matr...
github
sanghosuh/lens_nmf-matlab-master
lens_nmf.bak.m
.m
lens_nmf-matlab-master/library/lens_nmf/lens_nmf.bak.m
4,098
utf_8
2d70f47e31eb3f1cc1db8f894af46665
% NOTE: This version is NOT in use as it is outdated % (It is before rank-2 NMF has been applied) % % Localizd Ensemble of Nonnegative Matrix Factorization (L-EnsNMF) % % Written by Sangho Suh (sh31659@gmail.com) % Dept. of Computer Science and Engineering, % Korea University % % Reference...
github
sanghosuh/lens_nmf-matlab-master
tfidf2.m
.m
lens_nmf-matlab-master/library/topictoolbox/tfidf2.m
794
utf_8
7e53767d9b5be3579b2c33e015e1991e
function [Y w] = tfidf2( X ) % FUNCTION applies TF-IDF weighting to word count vector matrix. % % [Y w] = tfidf2( X ); % % INPUT : % X - word count vectors (one column = one document) % % OUTPUT : % Y - TF-IDF weighted document-term matrix % w - IDF weights (useful to process other document...
github
masa-nudt/KCFDPT-master
run_tracker.m
.m
KCFDPT-master/run_tracker.m
4,772
utf_8
01f944bd59d3493d2df3bc098150dc22
% KCFDPT enhances KCFDP with "Background Suppression" % KCFDP is the visual object tracker presented in: % "Enable Scale and Aspect Ratio Adaptability in Visual Tracking with Detection Proposals" BMVC, 2015 % % Dafei Huang, Lei Luo, Mei Wen, Zhaoyun Chen and Chunyuan Zhang % % Utilization of EdgeBox...
github
masa-nudt/KCFDPT-master
run_KCFDPT.m
.m
KCFDPT-master/run_KCFDPT.m
4,286
utf_8
50eee1de0783f61cec78a3c38ae0e7e7
% KCFDPT enhances KCFDP with "Background Suppression" % KCFDP is the visual object tracker presented in: % "Enable Scale and Aspect Ratio Adaptability in Visual Tracking with Detection Proposals" BMVC, 2015 % % Dafei Huang, Lei Luo, Mei Wen, Zhaoyun Chen and Chunyuan Zhang % % Utilization of EdgeBoxes to e...
github
masa-nudt/KCFDPT-master
tracker.m
.m
KCFDPT-master/tracker.m
12,152
utf_8
03823a16cd4562c9c8895d265bfebe8f
% Original code is from Kernelized/Dual Correlation Filter (KCF/DCF) % by Joao F. Henriques, 2015 % Integrated and modified by Dafei Huang function [rect_position, fps] = tracker(params, ... padding, sigma, lambda, output_sigma_factor, interp_factor, ... cell_size, hog_orientations, ... mode...
github
masa-nudt/KCFDPT-master
edgeBoxesTrackParam.m
.m
KCFDPT-master/edgeBoxesTrackParam.m
4,994
utf_8
aae1f43113514db72a60c1023b1543cb
function bbs = edgeBoxesTrackParam( I, model, backSup_size, varargin ) % Generate Edge Boxes object proposals in given image(s). % % Compute Edge Boxes object proposals as described in: % C. Lawrence Zitnick and Piotr Doll? % "Edge Boxes: Locating Object Proposals from Edges", ECCV 2014. % The proposal boxes ar...
github
masa-nudt/KCFDPT-master
find_scale_change_level_seqs.m
.m
KCFDPT-master/anno_tool/find_scale_change_level_seqs.m
1,502
utf_8
ff2265e4bcedb5b56bfa05372b7d4d16
% Use 2.0, 1.8, 1.6 as parameter to find out sequences with different scale variation levels function find_scale_change_level_seqs(scale_exam_thres) pathAnno = './anno/'; attPath = './anno/att/'; addpath('./util/'); seqs = configSeqs; total_sc_variation = 0; total_frame = 0; count_variation_seqs = 0; f...
github
masa-nudt/KCFDPT-master
find_aspect_ratio_change_seqs.m
.m
KCFDPT-master/anno_tool/find_aspect_ratio_change_seqs.m
1,666
utf_8
484a19e57cc10a9eb4bc3da64a0835ff
% Find out and annotate sequences with obvious aspect ratio variation function find_aspect_ratio_change_seqs() pathAnno = './anno/'; attPath = './anno/att/'; addpath('./util/'); seqs = configSeqs; total_ar_variation = 0; total_frame = 0; for idxSeq=1:length(seqs) s = seqs{idxSeq}; s.len =...
github
masa-nudt/KCFDPT-master
find_aspect_ratio_change_level_seqs.m
.m
KCFDPT-master/anno_tool/find_aspect_ratio_change_level_seqs.m
1,266
utf_8
d7d2537ca8c5744e27546ffddf18a76c
% Use 1.6, 1.5, 1.4 as parameter to find out sequences with different aspect ratio variation levels function find_aspect_ratio_change_level_seqs(aspect_ratio_exam_thres) pathAnno = './anno/'; attPath = './anno/att/'; addpath('./util/'); seqs = configSeqs; total_ar_variation = 0; total_frame = 0; for idx...
github
masa-nudt/KCFDPT-master
find_scale_change_rate_seqs.m
.m
KCFDPT-master/anno_tool/find_scale_change_rate_seqs.m
1,502
utf_8
8cd0438817329932aab7fd4f6f2dc435
% Use 10, 20, 30 as parameter to find out sequences with different scale variation rates function find_scale_change_rate_seqs(scale_exam_window) pathAnno = './anno/'; attPath = './anno/att/'; addpath('./util/'); seqs = configSeqs; total_sc_variation = 0; total_frame = 0; count_variation_seqs = 0; for i...
github
masa-nudt/KCFDPT-master
find_aspect_ratio_change_rate_seqs.m
.m
KCFDPT-master/anno_tool/find_aspect_ratio_change_rate_seqs.m
1,266
utf_8
2b76b2d3af9ff02bb8bf9677ee8f35ea
% Use 10, 20, 30 as parameter to find out sequences with different aspect ratio variation rates function find_aspect_ratio_change_rate_seqs(aspect_ratio_exam_window) pathAnno = './anno/'; attPath = './anno/att/'; addpath('./util/'); seqs = configSeqs; total_ar_variation = 0; total_frame = 0; for idxSeq=...
github
tsajed/nmr-pred-master
s2spinach.m
.m
nmr-pred-master/spinach/etc/s2spinach.m
5,215
utf_8
66d7be1c0060b13e05fc7e6e10f05a32
% Reads SIMPSON spin system specification file and converts the % information into Spinach data structures. Syntax: % % [sys,inter]=s2spinach(filename) % % i.kuprov@soton.ac.uk function [sys,inter]=s2spinach(filename) % Check consistency grumble(filename); % Read the file fid=fopen(filen...
github
tsajed/nmr-pred-master
fid2ascii.m
.m
nmr-pred-master/spinach/etc/fid2ascii.m
2,254
utf_8
d290db1a84bcaac9d24a144a520fdb7a
% Writes free induction decays into ASCII files. % % <http://spindynamics.org/wiki/index.php?title=Fid2ascii.m> function fid2ascii(file_name,fid) % Check consistency grumble(fid) % Open the file for writing file_id=fopen(file_name,'w'); % Decide data dimensions if isvector(fid) % Interleave ...
github
tsajed/nmr-pred-master
destreak.m
.m
nmr-pred-master/spinach/etc/destreak.m
1,830
utf_8
e9cdee5122a200e1b85297391b7ffc4e
% Reduces streak artefacts in 2D and 3D NMR spectra. % % <http://spindynamics.org/wiki/index.php?title=Destreak.m> function spectrum=destreak(spectrum) % Process structures and cell arrays recursively if isstruct(spectrum) % Get the field names struct_fieldnames=fieldnames(spectrum); ...
github
tsajed/nmr-pred-master
guess_csa_pro.m
.m
nmr-pred-master/spinach/etc/guess_csa_pro.m
4,861
utf_8
fd23d5a9383a5e93c2cb219ad3f6e9c2
% Chemical shieft anisotropy estimates for peptide bond heteroatoms. % % <http://spindynamics.org/wiki/index.php?title=Guess_csa_pro.m> function CSAs=guess_csa_pro(aa_nums,pdb_ids,coords) % Check consistency grumble(aa_nums,pdb_ids,coords); % Preallocate CSA array CSAs=cell(numel(pdb_ids),1); % Number t...
github
tsajed/nmr-pred-master
zfs_sampling.m
.m
nmr-pred-master/spinach/etc/zfs_sampling.m
1,871
utf_8
0641b3e36d23a8312fd27193983e1961
% Sampling function for ZFS parameter distributions. % % <http://spindynamics.org/wiki/index.php?title=Zfs_sampling.m> function [D,E,W]=zfs_sampling(npoints_d,npoints_e,tol) % Check consistency grumble(npoints_d,npoints_e,tol); % Generate Gauss-Legendre point set for D/D1 [X,WX]=lgwt(npoints_d,-2,2); % ...
github
tsajed/nmr-pred-master
strychnine.m
.m
nmr-pred-master/spinach/etc/strychnine.m
6,944
utf_8
1ca29f49a8c2c448992a9ce45a75be9f
% Spin system of strychnine. % % <http://spindynamics.org/wiki/index.php?title=Strychnine.m> function [sys,inter]=strychnine(spins) % Check consistency grumble(spins); % Shorthands for human-readable coupling designations below H1=1; H2=2; H3=3; H4=4; H8=5; H11a=6; H11b=7; H12=8; H13=9; H14=10; H15a=11; H15b=12; H16...
github
tsajed/nmr-pred-master
read_pdb_nuc.m
.m
nmr-pred-master/spinach/etc/read_pdb_nuc.m
2,126
utf_8
39429a1bc93649e3031f4b00e94ac39b
% Reads DNA/RNA PDB files. % % <http://spindynamics.org/wiki/index.php?title=Read_pdb_nuc.m> function [res_num,res_typ,pdb_id,coords]=read_pdb_nuc(pdb_file_name) % Check consistency grumble(pdb_file_name); % Open the PDB file file_id=fopen(pdb_file_name,'r'); % Get the outputs started res_num=[]; res_t...
github
tsajed/nmr-pred-master
g2spinach.m
.m
nmr-pred-master/spinach/etc/g2spinach.m
5,250
utf_8
0a51da6a3f1beb6f44e4a32f5bce5cc5
% Forms Spinach data structures from Gaussian parsing output returned by gparse.m function. % % <http://spindynamics.org/wiki/index.php?title=G2spinach.m> function [sys,inter]=g2spinach(props,particles,references,options) % Check consistency grumble(props,particles,references,options); % Index the particles...
github
tsajed/nmr-pred-master
nuclacid.m
.m
nmr-pred-master/spinach/etc/nuclacid.m
6,159
utf_8
2f294048b43c8779677853ea1a7f6d1e
% Nucleic acid data import function. % % <http://spindynamics.org/wiki/index.php?title=Nuclacid.m> function [sys,inter]=nuclacid(pdb_file,shift_file,options) % Check consistency grumble(pdb_file,shift_file,options); % Parse the PDB file [pdb_res_num,pdb_res_typ,pdb_atom_id,pdb_coords]=read_pdb_nuc(pdb_file...
github
tsajed/nmr-pred-master
karplus_fit.m
.m
nmr-pred-master/spinach/etc/karplus_fit.m
2,163
utf_8
88a96f6fa5b27b83469c881f014c0b4f
% Fits a Karplus curve to a Gaussian dihedral angle scan. % % <http://spindynamics.org/wiki/index.php?title=Karplus_fit.m> function [A,B,C]=karplus_fit(dir_path,atoms) % Get all log files in the directory logfiles=dir([dir_path '/*.log']); % Get the arrays going phi=[]; J=[]; E=[]; % Extract parameters ...
github
tsajed/nmr-pred-master
guess_j_nuc.m
.m
nmr-pred-master/spinach/etc/guess_j_nuc.m
22,317
utf_8
f8b937a6d65affdaed2c42d5e0fa4f31
% Assigns J-couplings from literature values and Karplus curves. % % <http://spindynamics.org/wiki/index.php?title=Guess_j_nuc.m> function jmatrix=guess_j_nuc(nuc_num,nuc_typ,pdb_id,coords) % Check consistency grumble(nuc_num,nuc_typ,pdb_id,coords); % Preallocate the answer jmatrix=cell(numel(coords),numel...
github
tsajed/nmr-pred-master
read_bmrb.m
.m
nmr-pred-master/spinach/etc/read_bmrb.m
1,506
utf_8
9db070c1569393233d092fcb8cb1e771
% This function reads BMRB files. % % <http://spindynamics.org/wiki/index.php?title=Read_bmrb.m> function [aa_num,aa_typ,pdb_id,chemsh]=read_bmrb(bmrb_file_name) % Check consistency grumble(bmrb_file_name); % Open the BMRB file file_id=fopen(bmrb_file_name,'r'); % Get the outputs started aa_num=[]; aa_...
github
tsajed/nmr-pred-master
gparse.m
.m
nmr-pred-master/spinach/etc/gparse.m
11,883
utf_8
40b0d3197608f1798482b3597c8a2952
% A parser for Gaussian03 and Gaussian09 calculation logs. % % <http://spindynamics.org/wiki/index.php?title=Gparse.m> function props=gparse(filename,options) % Read the file file_id=fopen(filename,'r'); g03_output=textscan(file_id,'%s','delimiter','\n'); fclose(file_id); g03_output=g03_output{1}; % Debla...
github
tsajed/nmr-pred-master
read_pdb_pro.m
.m
nmr-pred-master/spinach/etc/read_pdb_pro.m
2,872
utf_8
525d354869dff389bc59cb97e181f54f
% Reads protein PDB data. % % <http://spindynamics.org/wiki/index.php?title=Read_pdb_pro.m> function [aa_num,aa_typ,pdb_id,coords]=read_pdb_pro(pdb_file_name,instance) % Check consistency grumble(pdb_file_name,instance); % Open the PDB file file_id=fopen(pdb_file_name,'r'); % Scroll to the selected stru...
github
tsajed/nmr-pred-master
cst_display.m
.m
nmr-pred-master/spinach/etc/cst_display.m
4,512
utf_8
511a7e959a0f8ca32ef4b579ddebcafd
% Ellipsoid plots of chemical shielding tensors and their eigensystems. % % <http://spindynamics.org/wiki/index.php?title=Cst_display.m> function cst_display(props,atoms,scaling_factor,conmatrix) % Check consistency grumble(props,atoms,scaling_factor,conmatrix); % Set up graphics figure(); hold on; colorma...
github
tsajed/nmr-pred-master
hfc_display.m
.m
nmr-pred-master/spinach/etc/hfc_display.m
4,543
utf_8
a50d0d45bec27c2e55cfe2c48509826f
% Ellipsoid plots of hyperfine coupling tensors. % % <http://spindynamics.org/wiki/index.php?title=Hfc_display.m> function hfc_display(props,atoms,scaling_factor,conmatrix) % Set up graphics figure(); clf reset; hold on; colormap hot; opengl software; light('Position',[-2,2,20]); light('Position',[10,10,10]);...
github
tsajed/nmr-pred-master
oparse.m
.m
nmr-pred-master/spinach/etc/oparse.m
3,011
utf_8
d644fff672c2bdc2ae87f74af0784137
% A parser for ORCA logs. % % <http://spindynamics.org/wiki/index.php?title=Oparse.m> function props=oparse(file_name) % Check consistency grumble(file_name); % Read the file file_id=fopen(file_name,'r'); orca_log=textscan(file_id,'%s','delimiter','\n'); fclose(file_id); orca_log=orca_log{1}; props.file...
github
tsajed/nmr-pred-master
protein.m
.m
nmr-pred-master/spinach/etc/protein.m
12,478
utf_8
00ed6a47c240f3078156f9a6da717d42
% Protein data import function. % % <http://spindynamics.org/wiki/index.php?title=Protein.m> function [sys,inter]=protein(pdb_file,bmrb_file,options) % Check consistency grumble(pdb_file,bmrb_file,options); % Parse the PDB file [pdb_aa_num,pdb_aa_typ,pdb_atom_id,pdb_coords]=read_pdb_pro(pdb_file,options.pd...
github
tsajed/nmr-pred-master
guess_j_pro.m
.m
nmr-pred-master/spinach/etc/guess_j_pro.m
43,552
utf_8
14f3a65cfff1df052e1f7bac2961da02
% Assigns J-couplings from literature values and Karplus curves. % % <http://spindynamics.org/wiki/index.php?title=Guess_j_pro.m> function jmatrix=guess_j_pro(aa_num,aa_typ,pdb_id,coords) % Check consistency grumble(aa_num,aa_typ,pdb_id,coords); % Preallocate the answer jmatrix=cell(numel(coords),numel(coo...
github
tsajed/nmr-pred-master
ocparse.m
.m
nmr-pred-master/spinach/etc/ocparse.m
1,903
utf_8
4c4c8607b6468e09df40c3b31e69d269
% ORCA cube file parser. Extracts the normalised probability density and % the associated metric information from ORCA cube files. Syntax: % % [density,ext,dx,dy,dz]=ocparse(filename) % % Outputs: % % density - probability density cube with dimensions % ordered as [X Y Z] % %...
github
tsajed/nmr-pred-master
write_movie.m
.m
nmr-pred-master/spinach/interfaces/write_movie.m
501
utf_8
7cd0058285259cf5914ed341292b8b1f
% Orbits the camera around a 3D plot and writes a movie. % % i.kuprov@outlook.com function write_movie(file_name) % Open the video writer object writerObj=VideoWriter(file_name,'MPEG-4'); open(writerObj); % Orbit the camera for n=1:360 % Grab the frame writeVideo(writerObj,getframe(gcf));...
github
tsajed/nmr-pred-master
assume.m
.m
nmr-pred-master/spinach/kernel/assume.m
22,636
utf_8
2293a974f8af42896f8756162a65df48
% Sets case-specific assumptions for various simulation contexts. This % function determines the behaviour of the Hamiltonian generation func- % tion and should be called before the Hamiltonian is requested. % % The function text is self-explanatory -- interaction strength parame- % ters are set in each section ac...
github
tsajed/nmr-pred-master
execute.m
.m
nmr-pred-master/spinach/kernel/execute.m
2,315
utf_8
707e4338d2a351b55fcbd04cc0d08cca
% Applies an event sequence to a state vector. Not very sophisticated % or efficient at the moment, further improvements to come. Syntax: % % rho=execute(spin_system,operators,durations,rho) % % where operators is a cell array of Hamiltonians or Liouvilians and % durations is a vector of times for which t...
github
tsajed/nmr-pred-master
step.m
.m
nmr-pred-master/spinach/kernel/step.m
5,336
utf_8
1af6dd98005186946f9b8d5c0e1bd018
% Propagation step function. Uses Krylov propagation and sparse exponenti- % ation where appropriate. Syntax: % % rho=step(spin_system,L,rho,time_step) % % Arguments: % % L - Liouvillian or Hamiltonian to be used for propagation % % rho - state vector or density ma...
github
tsajed/nmr-pred-master
relaxation.m
.m
nmr-pred-master/spinach/kernel/relaxation.m
29,210
utf_8
1c4a5af71f148ab358fa540c512b7035
% The relaxation superoperator. All options are set during the call to % create.m function. Syntax: % % R=relaxation(spin_system,euler_angles) % % where euler_angles should be used for solid state systems in which % the thermal equilibrium state is orientation-dependent. % % Further information ...
github
tsajed/nmr-pred-master
state.m
.m
nmr-pred-master/spinach/kernel/state.m
5,293
utf_8
65400ecadbbdef5c48ef7758937b9103
% State operators (Hilbert space) and state vectors (Liouville space). % % <http://spindynamics.org/wiki/index.php?title=State.m> function rho=state(spin_system,states,spins,method) % Validate the input grumble(spin_system,states,spins); % Default is to use consistent state norms if ~exist('method','var'),...
github
tsajed/nmr-pred-master
krylov.m
.m
nmr-pred-master/spinach/kernel/krylov.m
9,035
utf_8
39d4c50f6ad537a593fcb4dd160b1260
% Krylov propagation function. Avoids matrix exponentiation, but can be % slow. Should be used when the Liouvillian exponential does not fit in- % to the system memory, but the Liouvillian itself does. Syntax: % % answer=krylov(spin_system,L,coil,rho,time_step,nsteps,output) % % Arguments for Liouville space...
github
tsajed/nmr-pred-master
stateinfo.m
.m
nmr-pred-master/spinach/kernel/stateinfo.m
2,008
utf_8
d0fad609ddeb1759df04280a957482fb
% Prints the state vector norm and the list of the most populated basis % states in the order of decreasing population. Syntax: % % stateinfo(spin_system,rho,npops) % Parameters: % % rho - state vector % % npops - number of largest populations to print % % No...
github
tsajed/nmr-pred-master
evolution.m
.m
nmr-pred-master/spinach/kernel/evolution.m
39,585
utf_8
5015230a6b7861d68eaaaaad05dd6e63
% Time evolution function. Performs all types of time propagation with % automatic trajectory level state space restriction. Syntax: % % answer=evolution(spin_system,L,coil,rho,timestep,... % nsteps,output,destination) % % Arguments for Liouville space calculations: % % L ...
github
tsajed/nmr-pred-master
hamiltonian.m
.m
nmr-pred-master/spinach/kernel/hamiltonian.m
33,597
utf_8
45431ad588a9b53651e7adf0d3d0bff5
% Hamiltonian operator / superoperator and its rotational decomposition. % Descriptor and operator generation is parallelized. Syntax: % % [H,Q]=hamiltonian(spin_system,operator_type) % % In Liouville space calculations, operator_type can be set to: % % 'left' - p...
github
tsajed/nmr-pred-master
orientation.m
.m
nmr-pred-master/spinach/kernel/orientation.m
1,945
utf_8
d225044f72eed3cbc2036cc373a68f1b
% Anisotropic part of the Hamiltonian for a specific spin system % orientation. Syntax: % % H=orientation(Q,euler_angles) % % Arguments: % % Q - rotational basis as returned by hamiltonian % function. % % euler_angles - a 1x3 vector or a vertical stack o...
github
tsajed/nmr-pred-master
splice.m
.m
nmr-pred-master/spinach/kernel/splice.m
4,118
utf_8
765f21f9b3ef8b6b23220e95dedbb5bd
% Merges timing tables of pulse sequence channels. Both timing tables % should be given as row arrays of the following structure: % % A={A_1 A_2 ... A_n}; dtA=[dt_1 dt_2 ... dt_n]; % % where A_k is a spin operator and dt_k is the time for which it acts. % The sequence is assumed to be executed chronol...
github
tsajed/nmr-pred-master
rotframe.m
.m
nmr-pred-master/spinach/kernel/rotframe.m
2,062
utf_8
e115fa73c9e879a9753f418c8537ee1a
% Rotating frame transformation with respect to a specified % group of spins to specified order in perturbation theory. % Syntax: % % H=rotframe(spin_system,H0,H,isotope,order) % % Parameters: % % H0 - carrier Hamiltonian with respect to which the % rotating frame transformation is ...
github
tsajed/nmr-pred-master
average.m
.m
nmr-pred-master/spinach/kernel/average.m
9,900
utf_8
b95fad736487064601cfde341ec9859b
% Average Hamiltonian theories under Zeeman interaction rotating frame % transformations. Syntax: % % H=average(spin_system,Hp,H0,Hm,omega,theory) % % Parameters: % % Hp - the part of the rotating frame Hamiltonian that has positive % frequency under the rotating frame transformatio...
github
tsajed/nmr-pred-master
carrier.m
.m
nmr-pred-master/spinach/kernel/carrier.m
1,110
utf_8
aa5ea9c3a4ec0a4f321d12e31567ceb6
% Returns the "carrier" Hamiltonian - the part of the Zeeman % interaction Hamiltonian that corresponds to all particles % having the Zeeman frequency prescribed by their magnetogy- % ric ratio and the magnet field specified by the user. This % Hamiltonian is frequently used in rotating frame transfor- % mations ...
github
tsajed/nmr-pred-master
decouple.m
.m
nmr-pred-master/spinach/kernel/decouple.m
3,030
utf_8
7872a92a90308c8b6b7282e230084a90
% Obliterates all interactions and populations in the subspace of states % that involve user-specified spins in any way. The specified spins would % not contribute to the system dynamics until the Liouvillian is rebuilt % from scratch. Syntax: % % [L,rho]=decouple(spin_system,L,rho,spins) % % ...
github
tsajed/nmr-pred-master
singlet.m
.m
nmr-pred-master/spinach/kernel/singlet.m
1,357
utf_8
c7fd78a536cdee077971bd06c921bfed
% Returns a two-spin singlet state. Syntax: % % rho=singlet(spin_system,spin_a,spin_b) % % Arguments: % % spin_a - the number of the first spin in the singlet state % % spin_b - the number of the second spin in the singlet state % % i.kuprov@soton.ac.uk function rho=singlet(spin...
github
tsajed/nmr-pred-master
create.m
.m
nmr-pred-master/spinach/kernel/create.m
66,689
utf_8
9d8a27fd29231970b6edabf2bc1145fd
% Spin system and interaction specification. % % <http://spindynamics.org/wiki/index.php?title=Spin_system_specification> function spin_system=create(sys,inter) % Close all open files fclose('all'); % Locate the root and run sanity checks if isempty(which('existentials')) % Tell the user to RTFM...
github
tsajed/nmr-pred-master
spin.m
.m
nmr-pred-master/spinach/kernel/spin.m
33,566
utf_8
f7cdee02ee6b72e8e3619a7abc6b0029
% Database of multiplicities and magnetogyric ratios for sta- % ble and long-lived isotopes with non-zero spin. Syntax: % % [gamma,multiplicity]=spin(name) % % where the name of the isotope is given in the standard way, % e.g. 13C or 195Pt. High-spin electrons may be requested by % supplying 'E' f...
github
tsajed/nmr-pred-master
trajan.m
.m
nmr-pred-master/spinach/kernel/trajan.m
8,616
utf_8
cfdb63f08f3d1bcf49595de836bc1b19
% Trajectory analysis function. Plots the time dependence of the densi- % ty matrix norm, partitioned into user-specified property classes. % % Call syntax: % % trajan(spin_system,trajectory,property) % % Arguments: % % trajectory - a stack of state vectors of any length. The % number...
github
tsajed/nmr-pred-master
frqoffset.m
.m
nmr-pred-master/spinach/kernel/frqoffset.m
3,566
utf_8
98b35ea109750bbae94e2ee05571b05d
% Adds offset frequencies to the Hamiltonian. Syntax: % % H=frqoffset(spin_system,H,parameters) % % where H is the Hamiltonian and parameters should contain % the following subfields: % % parameters.spins - a cell array giving the % spins that the pulse sequence works on, in ...
github
tsajed/nmr-pred-master
homospoil.m
.m
nmr-pred-master/spinach/kernel/homospoil.m
2,499
utf_8
be97284024d04086a9e28d58d38f9c64
% Emulates a strong homospoil pulse - only zero-frequency states % survive the process. Syntax: % % rho=homospoil(spin_system,rho,zqc_flag) % % Parameters: % % rho - a state vector or a horizontal stack thereof % % zqc_flag - a flag controlling the fate of zero-quantum % ...
github
tsajed/nmr-pred-master
basis.m
.m
nmr-pred-master/spinach/kernel/basis.m
25,413
utf_8
e849e7e3736fb8cf2344dbff1b2f1332
% Basis set control. This is the second mandatory function (after create.m) % that must be executed in every calculation to get the Spinach kernel go- % ing. See the Basis Selection section of the Spinach manual for the detail- % ed description of the various options. % % Note: it is very important that you under...
github
tsajed/nmr-pred-master
spinlock.m
.m
nmr-pred-master/spinach/kernel/spinlock.m
1,521
utf_8
e73d0f4759754be56c7a5fc9c1bd979a
% Analytical approximation to a spin locking process. This function oblite- % rates all spin-spin correlations and all magnetization components other % than those along the indicated direction. Parameters: % % Lx - X magnetization operator on the spins that % should be locked % % ...
github
tsajed/nmr-pred-master
lindbladian.m
.m
nmr-pred-master/spinach/kernel/lindbladian.m
1,460
utf_8
dca11201c0d29cbfc36031996ac2f53d
% Generates a Lindblad superoperator from user-specified left-side and % right-side product superoperators and calibrates it using the experi- % mental relaxation rate of a user-specified state. Syntax: % % R=lindbladian(A_left,A_right,rho,rlx_rate) % % where A_left is the left side product superoper...
github
tsajed/nmr-pred-master
propagator.m
.m
nmr-pred-master/spinach/kernel/propagator.m
7,103
utf_8
228cd2cfd371fa8680d2b3d433160043
% Calculates exponential propagators. Syntax: % % P=propagator(spin_system,L,timestep) % % returns exp(-i*L*t). The following calculation methods are % supported: % % 'cpu' - Taylor series with scaling and squaring % on CPU, spmd parallel if possible % % 'gpu' - Tayl...
github
tsajed/nmr-pred-master
kinetics.m
.m
nmr-pred-master/spinach/kernel/kinetics.m
9,090
utf_8
ab73d88d3360660aa7174960706cdba9
% Chemical kinetics superoperator. All adjustable parameters are specified % in the call to create.m function -- see the Input Preparation section of % Spinach manual. % % i.kuprov@soton.ac.uk % luke.edwards@ucl.ac.uk % hannah.hogben@chem.ox.ac.uk function K=kinetics(spin_system) % Preallocate the answer K...
github
tsajed/nmr-pred-master
operator.m
.m
nmr-pred-master/spinach/kernel/operator.m
3,563
utf_8
232e3910e3f858f1c9cd5d85ce3e8b6d
% Hilbert space operators and Liouville space superoperators. % % <http://spindynamics.org/wiki/index.php?title=Operator.m> function A=operator(spin_system,operators,spins,operator_type) % Validate the input grumble(spin_system,operators,spins); % The default type is commutation superoperator if ~exist('op...
github
tsajed/nmr-pred-master
residual.m
.m
nmr-pred-master/spinach/kernel/residual.m
2,306
utf_8
caf9051ccf62a2197e7a144614af7573
% Sets up interaction tensors under partial ordering in a liquid % crystal with the user-supplied order matrix. All adjustable pa- % rameters are set during the call to create.m function. Syntax: % % spin_system=residual(spin_system) % % Note: this function is only applicable to high-field NMR. % ...
github
tsajed/nmr-pred-master
thermalize.m
.m
nmr-pred-master/spinach/kernel/thermalize.m
1,058
utf_8
0202b4d5a16beaabe415ea39be31f719
% Modifies a symmetric relaxation superoperator to relax the system % towards a user-specified state. Liouville space spherical tensor % formalism only. Syntax: % % R=thermalize(spin_system,R,rho) % % i.kuprov@soton.ac.uk function R=thermalize(spin_system,R,rho) if strcmp(spin_system.bas.fo...
github
tsajed/nmr-pred-master
trajsimil.m
.m
nmr-pred-master/spinach/kernel/trajsimil.m
5,910
utf_8
a3776b1fcac41800e2d9e696b6d9c9e2
% Computes trajectory similarity scores. Returns a function representing % "similarity" of the two state space trajectories at different points in % time. Trajectory must be supplied as nstates x nsteps matrix. Syntax: % % trajsimil(spin_system,trajectory_1,trajectory_2,method) % % Score functions: % %...
github
tsajed/nmr-pred-master
correlation.m
.m
nmr-pred-master/spinach/kernel/correlation.m
2,846
utf_8
2e85e82540e5c585bc1fc973376c35fa
% Correlation order selection function -- keeps only the specified orders % of spin correlation in the state vector. Syntax: % % rho=correlation(spin_system,rho,correlation_orders,spins) % % Arguments: % % rho - a state vector or a horizontal stack thereof % % correlation_orders - a ...
github
tsajed/nmr-pred-master
stepsize.m
.m
nmr-pred-master/spinach/kernel/stepsize.m
1,987
utf_8
95cd54b97d90c922a925508e0b07cd84
% Optimal step for time propagation under a given Hamiltonian or a given % Liouvillian superoperator. The function uses the 1-norm (which is the % cheapest variety and the safest one in terms of matrix scaling). % % Syntax: [timestep,nsteps]=stepsize(L,interval) % % Parameters: % % L - Liouv...
github
tsajed/nmr-pred-master
coherence.m
.m
nmr-pred-master/spinach/kernel/coherence.m
2,569
utf_8
0fee30c7e46dc64919bc2cc9f1691f15
% Coherence selection function. % % <http://spindynamics.org/wiki/index.php?title=Coherence.m> function rho=coherence(spin_system,rho,spec) % Check consistency grumble(spin_system,rho,spec); % Store dimension statistics spn_dim=size(spin_system.bas.basis,1); spc_dim=numel(rho)/spn_dim; problem_dims=size(...
github
tsajed/nmr-pred-master
repulsion.m
.m
nmr-pred-master/spinach/kernel/grids/repulsion.m
3,473
utf_8
538e1a0c3c3f3c705c3cb1270630dafc
% Generates repulsion grids on a unit hypersphere. See the paper by % Bak and Nielsen (http://dx.doi.org/10.1006/jmre.1996.1087) to get % further information on the algorithm involved. Syntax: % % [alphas,betas,gammas,weights]=repulsion(npoints,ndims,niter) % % Parameters: % % npoints - number of points ...
github
tsajed/nmr-pred-master
shrewd.m
.m
nmr-pred-master/spinach/kernel/grids/shrewd.m
2,339
utf_8
099331e118ef28cc811358b6503178f2
% Computes SHREWD weights for a given two- or three-angle spherical % grid. See the paper by Eden and Levitt for details on now the al- % gorithm works: http://dx.doi.org/10.1006/jmre.1998.1427 Syntax: % % weights=shrewd(alphas,betas,gammas,max_rank,max_error) % % Parameters: % % alphas - alpha Euler ...
github
tsajed/nmr-pred-master
grid_kron.m
.m
nmr-pred-master/spinach/kernel/grids/grid_kron.m
1,933
utf_8
90a14b2d08b8e62ae823a695b96a3246
% Spherical grid direct product. Tiles one grid using the rotations of % the other. Grids should be supplied using Euler angles in three col- % umns [alphas betas gammas] in radians. Syntax: % % [angles,weights]=grid_kron(angles1,weights1,angles2,weights2) % % Parameters: % % angles1 - angles of the first...
github
tsajed/nmr-pred-master
gaussleg.m
.m
nmr-pred-master/spinach/kernel/grids/gaussleg.m
817
utf_8
9a921d02d31d116cc03d0d80493a2c52
% Computes Gauss-Legendre points and weights in [a,b] interval % with accuracy order n. % % i.kuprov@soton.ac.uk function [x,w]=gaussleg(a,b,n) % Initial guess for the nodes in [-1 1] x=cos((2*(0:n)'+1)*pi/(2*n+2))+(0.27/(n+1))*sin(pi*linspace(-1,1,n+1)'*n/(n+2)); % Newton-Raphson refinement V=zeros(n+1,n...
github
tsajed/nmr-pred-master
grid_test.m
.m
nmr-pred-master/spinach/kernel/grids/grid_test.m
2,042
utf_8
f370fb0071661c47b7bcf44d41044696
% Plots grid integration quality as a function of spherical rank. The % quality is defined as the norm of the residual of spherical harmon- % ics or Wigner functions integrated using the grid provided. Syntax: % % grid_profile=grid_test(alphas,betas,gammas,weights,max_rank,sfun) % % Parameters: % % alphas...
github
tsajed/nmr-pred-master
fpl2rho.m
.m
nmr-pred-master/spinach/kernel/utilities/fpl2rho.m
626
utf_8
acb785abd725b06f1f125556bd9f68c9
% Integrates over the spatial degrees of freedom and returns the % average spin state vector across the sample. Syntax: % % rho=fpl2rho(rho,dims) % % Parameters: % % rho - Fokker-Planck state vector % % dims - spatial dimensions of the % Fokker-...
github
tsajed/nmr-pred-master
binpack.m
.m
nmr-pred-master/spinach/kernel/utilities/binpack.m
870
utf_8
f10cfd77f138e0e0b946e6bb85b6f4c6
% A simple 1D bin packing algorithm. % % i.kuprov@soton.ac.uk function bins=binpack(box_sizes,bin_size) % Number the boxes box_index=(1:numel(box_sizes))'; % Find boxes that are bigger than bins big_boxes=(box_sizes>bin_size); bins=num2cell(box_index(big_boxes)); box_sizes(big_boxes)=[]; box_index(big_...
github
tsajed/nmr-pred-master
irr_sph_ten.m
.m
nmr-pred-master/spinach/kernel/utilities/irr_sph_ten.m
2,950
utf_8
edc07d4ae6e4da2dde5ff2487b9ebb14
% Returns a cell array of single-spin irreducible spherical tensor opera- % tors T(k,m). A two-argument call % % T=irr_sph_ten(mult,k) % % where 'mult' is the multiplicity of the spin in question and 'k' is the % irreducible spherical tensor rank required, returns a cell array of ten- % ...
github
tsajed/nmr-pred-master
human2opspec.m
.m
nmr-pred-master/spinach/kernel/utilities/human2opspec.m
5,635
utf_8
e938a5147583cb1af886ab53f438f170
% Converts user-friendly descriptions of spin states and operators into the % formal description (opspec) used by Spinach kernel. The function supports % two types of calls: % % 1. If both inputs are strings, e.g. % % [opspecs,coeffs]=human2opspec(spin_system,'Lz','13C') % % the function returns a list o...
github
tsajed/nmr-pred-master
sphten2zeeman.m
.m
nmr-pred-master/spinach/kernel/utilities/sphten2zeeman.m
1,071
utf_8
4c8a7a1a8a92a3e13a0be77956ee37bf
% Returns a matrix that converts state vectors written in the % spherical tensor basis set used by Spinach into state vectors % written in the Zeeman basis set in Liouville space. % % Note: the matrix need not be square and may be huge. % % i.kuprov@soton.ac.uk function P=sphten2zeeman(spin_system) % Preal...
github
tsajed/nmr-pred-master
axrh2mat.m
.m
nmr-pred-master/spinach/kernel/utilities/axrh2mat.m
1,601
utf_8
b3d6cd0ee8ee8d3fdebe01b359d1fb5c
% Converts axiality and rhombicity representation of the anisotro- % pic part of a 3x3 interaction tensor into the corresponding mat- % rix. Euler angles should be specified in radians. Syntax: % % M=axrh2mat(iso,ax,rh,alp,bet,gam) % % Parameters: % % iso - isotropic part of the interact...
github
tsajed/nmr-pred-master
existentials.m
.m
nmr-pred-master/spinach/kernel/utilities/existentials.m
12,935
utf_8
08d056cded782d586ea36dc417733567
% Kernel integrity control. Checks for collisions between Spinach func- % tions and anything else that the user may have installed or written % in the current Matlab instance. % % Do not switch this off -- collisions of function names and path probl- % ems are the most frequent support topic at the forum. % % i....
github
tsajed/nmr-pred-master
wigner.m
.m
nmr-pred-master/spinach/kernel/utilities/wigner.m
1,432
utf_8
436429ecce79ecc2493a86cb52ec1c6a
% Computes Wigner matrices of user-specified ranks. Syntax: % % D=wigner(l,alp,bet,gam) % % where alp, bet and gam are Euler angles in radians. Rows and columns % of the resulting Wigner matrix are sorted by descending ranks, e.g.: % % [D( 2,2) ... D( 2,-2) % ...
github
tsajed/nmr-pred-master
tensor_analysis.m
.m
nmr-pred-master/spinach/kernel/utilities/tensor_analysis.m
1,616
utf_8
207b76ff9b5e1527be86f6ea9132189d
% Returns diagnostic information about an interaction tensor. Syntax: % % [eigvals,dcm,iso]=tensor_analysis(spin_system,tensor) % % Parameters: % % tensor - a 3x3 Cartesian interaction tensor matrix % % Outputs: % % eigvals - eigenvalues of the tensor % % dcm - direct...
github
tsajed/nmr-pred-master
zoom_3d.m
.m
nmr-pred-master/spinach/kernel/utilities/zoom_3d.m
1,556
utf_8
43f4854fa234f15ada77b68ae5be45ba
% Zooms a 3D data cube to the fractional limits specified % by the user. Syntax: % % [density,ext]=zoom_3d(density,ext,zoom_ranges) % % Parameters: % % density - probability density cube with dimensions % ordered as [X Y Z] % % ext - grid extents in Angstrom, ordered as ...
github
tsajed/nmr-pred-master
clebsch_gordan.m
.m
nmr-pred-master/spinach/kernel/utilities/clebsch_gordan.m
5,110
utf_8
6d77301826ebda2514757e13819586bb
% Calculates Clebsch-Gordan coefficients. Syntax: % % cg=clebsch_gordan(L,M,L1,M1,L2,M2) % % If physically inadmissible indices are supplied, a zero is returned. % % A very considerable amount of thought has been given to the accuracy % and performance of this fu...
github
tsajed/nmr-pred-master
euler2wigner.m
.m
nmr-pred-master/spinach/kernel/utilities/euler2wigner.m
4,265
utf_8
d6513655695ef5113c4156054c60001a
% Second-rank Wigner rotation matrix as a function of Euler angles. Two % possible input styles are: % % W=euler2wigner(alpha,beta,gamma) % W=euler2wigner([alpha beta gamma]) % % where alpha, beta and gamma are Euler angles in radians. Rows and columns % of the resulting Wig...
github
tsajed/nmr-pred-master
probmax.m
.m
nmr-pred-master/spinach/kernel/utilities/probmax.m
563
utf_8
62b608e4801e9141cdaa24967600dc43
% Finds the maximum of the probability density. % % i.kuprov@outlook.com function [x,y,z]=probmax(probden,ranges) % Get coordinate arrays [X,Y,Z]=ndgrid(linspace(ranges(1),ranges(2),size(probden,1)),... linspace(ranges(3),ranges(4),size(probden,2)),... linspace(ranges(5),ranges(...
github
tsajed/nmr-pred-master
fdmat.m
.m
nmr-pred-master/spinach/kernel/utilities/fdmat.m
1,435
utf_8
b51a5ff829b47097c12e13a52b875ade
% Returns arbitrary-order central finite-difference differentiation % matrix (sparse) with unit spacing and periodic boundary conditions. % Syntax: % % D=fdmat(dim,npoints,order) % % Parameters: % % dim - dimension of the column vector to be % differentiated % ...
github
tsajed/nmr-pred-master
hess_reorder.m
.m
nmr-pred-master/spinach/kernel/utilities/hess_reorder.m
2,292
utf_8
72c90d46e3eb7617e958eeb4cca8fb88
% The waveforms on different channels are assumed to be stored in the % rows of the input array. The Hessian elements correspond to the ele- % ments of the waveform array ordered as: % % [X1 Y1 Z1 X2 Y2 Z2 ... Xn Yn Zn] % % where X,Y,Z are different control channels and the index enumerates % the time...
github
tsajed/nmr-pred-master
absorb.m
.m
nmr-pred-master/spinach/kernel/utilities/absorb.m
1,539
utf_8
cdff513e969bcc9b1960712d1a5aed1f
% Designates specific states as "dark" -- any population reaching % them would end up being summed up and stored in them forever in % a frozen state. Syntax: % % L=absorb(spin_system,L,dark_states) % % where L is the Liouvillian and dark_states contains the numbers % of the states that should be s...
github
tsajed/nmr-pred-master
gauss2mhz.m
.m
nmr-pred-master/spinach/kernel/utilities/gauss2mhz.m
557
utf_8
866bc949d001ef3589f27a86a0d187de
% Converts hyperfine couplings from Gauss to MHz (linear % frequency). Syntax: % % hfc_mhz=gauss2mhz(hfc_gauss) % % Arrays of any dimensions are supported. % % i.kuprov@soton.ac.uk function hfc_mhz=gauss2mhz(hfc_gauss) if isnumeric(hfc_gauss)&&isreal(hfc_gauss) hfc_mhz=2.802495365*hfc_ga...
github
tsajed/nmr-pred-master
xyz2sph.m
.m
nmr-pred-master/spinach/kernel/utilities/xyz2sph.m
469
utf_8
4dcdd5ed3aa528bf792f9eb009a41d35
% Converts Cartesian coordinates [x y z] into spherical coordinates % according to the ISO convention. % % e.suturina@soton.ac.uk function [r, theta, phi] = xyz2sph(x, y, z) % Radius 0 <= r < Inf r=sqrt(x.^2+y.^2+z.^2); % Inclination 0 <= theta <= pi theta=acos(z./r); % Azimuth 0 <= phi < 2*pi phi=at...
github
tsajed/nmr-pred-master
v2fplanck.m
.m
nmr-pred-master/spinach/kernel/utilities/v2fplanck.m
788
utf_8
59585d448a9939f4be64a18af42d9c64
% Translates a stationary 3D velocity field into a Fokker-Planck % evolution generator. % % a.j.allami@soton.ac.uk % i.kuprov@soton.ac.uk function F=v2fplanck(U,V,W,parameters) % Get the translation generators [Fx,Fy,Fz]=hydrodynamics(parameters); % Build the Fokker-Planck flow generator F=spdiags(Fx*U(:...
github
tsajed/nmr-pred-master
axis_1d.m
.m
nmr-pred-master/spinach/kernel/utilities/axis_1d.m
2,492
utf_8
72119cf2ebad8b04c7a2d58b49548c3e
% Generates axes for plotting. % % i.kuprov@soton.ac.uk function [ax,ax_label]=axis_1d(spin_system,parameters) % Build the axis and apply the offset if numel(parameters.sweep)==1 ax=linspace(-parameters.sweep/2,parameters.sweep/2,parameters.zerofill)+parameters.offset; else ax=linspace(parameters.sw...
github
tsajed/nmr-pred-master
lmn2lin.m
.m
nmr-pred-master/spinach/kernel/utilities/lmn2lin.m
2,047
utf_8
e694562633c062dd42eb54db4d046c2a
% Converts L,M,N Wigner function specification to linear indexing speci- % fication. In the linear indexing convention, the Wigner functions are % listed in the order of increasing L rank. Within each L rank, the func- % tions are listed in the order of decreasing left index, and, for each % left index, in the orde...