Difference between revisions of "Import, export, and visualisation"

From Spinach Documentation Wiki
Jump to: navigation, search
(Undo revision 4431 by Kuprov (talk))
(removed index entry for deleted function bloch_sph_plot.m (removed per IK instruction 2026-08-30))
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
''Spinach'' is not intended to be a data processing package. The functions listed below assist in importing simulation settings and exporting simulation results into formats that are readable to data processing software.
 
''Spinach'' is not intended to be a data processing package. The functions listed below assist in importing simulation settings and exporting simulation results into formats that are readable to data processing software.
  
−
==Tensor visualisation==
+
==Interaction visualisation==
−
[[cst_display.m]] – visualizes chemical shielding tensors and their eigensystems.
+
[[cst_display.m]] – chemical shielding tensors and their eigensystems.
  
−
[[hfc_display.m]] – visualizes hyperfine coupling tensors and their eigensystems.  
+
[[efg_display.m]] - electric field gradient tensors and their eigensystems.
 +
 
 +
[[hfc_display.m]] – hyperfine coupling tensors and their eigensystems.
  
 
==Data import==
 
==Data import==
−
[[c2spinach.m]] - reads CASTEP .magres files.
+
[[b2spinach.m]] - Bruker NMR data import.
 +
 
 +
[[c2spinach.m]] - Reads CASTEP .magres files.
 +
 
 +
[[cyprinol.m]] - Returns Spinach input structures for the spin system of cyprinol.
 +
 
 +
[[fatty_acid.m]] - A reasonable approximation to a fatty acid spin system.
 +
 
 +
[[gissmo2spinach.m]] - Reads GISSMO XML files.
 +
 
 +
[[gparse.m]] - A parser for Gaussian03 and Gaussian09 calculation logs.
 +
 
 +
[[g2spinach.m]] - Converts [[gparse.m]] output into ''Spinach'' input structures.
 +
 
 +
[[karplus_fit.m]] - Performs Karplus coefficient estimation from a Gaussian J-coupling scan.
 +
 
 +
[[killcross.m]] - Zeroes the specified rows and columns of a matrix.
 +
 
 +
[[killdiag.m]] - Zeroes out the diagonal of a 2D spectrum.
 +
 
 +
[[methyl_group.m]] - Coordinates for the four atoms of a methyl group.
 +
 
 +
[[merge_inp.m]] - Merges multiple sys and inter structures into one.
 +
 
 +
[[nuclacid.m]] - Nucleic acid data import from PDB and BMRB data.
 +
 
 +
[[oparse.m]] - A parser for ORCA logs.
 +
 
 +
[[ocparse.m]] - A parser for ORCA cubes.
 +
 
 +
[[parsexml.m]] - Converts an XML file into a Matlab structure.
 +
 
 +
[[protein.m]] - Protein data import from PDB and BMRB data.
 +
 
 +
[[read_pdb_nuc.m]] - Reads PDB data for nucleic acids.
 +
 
 +
[[read_pdb_pro.m]] - Reads PDB data for proteins.
 +
 
 +
[[read_bmrb.m]] - Reads BMRB data for proteins.
 +
 
 +
[[v2spinach.m]] - Varian NMR data import.
  
−
[[cyprinol.m]] – returns Spinach input structures for the spin system of cyprinol.
+
[[weblab2nqi.m]] - Converts the Weblab one-cone model parameters into NQI tensors used by Spinach.
  
−
[[fatty_acid.m]] - a reasonable approximation to a fatty acid spin system.
+
[[x2spinach.m]] - Reads SpinXML files and forms Spinach data structures.
  
−
[[gissmo2spinach.m]] - reads GISSMO XML files.
+
==Standard spin systems==
  
−
[[gparse.m]] – a parser for Gaussian03 and Gaussian09 calculation logs.
+
[[allyl_pyruvate.m]] - allyl pyruvate spin system.
  
−
[[g2spinach.m]] – converts [[gparse.m]] output into ''Spinach'' input structures.
+
[[dac_reaction.m]] - Diels-Alder cycloaddition system.
  
−
[[karplus_fit.m]] – performs Karplus coefficient estimation from a Gaussian J-coupling scan.
+
[[diamond_co.m]] - cobalt-related defect spin system for diamond.
  
−
[[killcross.m]] - zeroes the specified rows and columns of a matrix.
+
[[diamond_gev0.m]] - GeV0 spin system for diamond.
  
−
[[killdiag.m]] - zeroes out the diagonal of a 2D spectrum.
+
[[diamond_n2vm.m]] - N2V- spin system for diamond.
  
−
[[methyl_group.m]] - coordinates for the four atoms of a methyl group.
+
[[diamond_n_inter.m]] - nitrogen interstitial spin system for diamond.
  
−
[[nuclacid.m]] - nucleic acid data import from PDB and BMRB data.
+
[[diamond_ni.m]] - nickel-related defect spin system for diamond.
  
−
[[oparse.m]] - a parser for ORCA logs.
+
[[diamond_nv0_es.m]] - NV0 excited-state spin system for diamond.
  
−
[[ocparse.m]] - a parser for ORCA cubes.
+
[[diamond_nvm_gs.m]] - NV centre ground state spin system for diamond.
  
−
[[parsexml.m]] - converts an XML file into a Matlab structure.
+
[[diamond_ov0.m]] - neutral oxygen-vacancy centre ground state spin system for diamond.
  
−
[[protein.m]] – protein data import from PDB and BMRB data.
+
[[diamond_p.m]] - phosphorus-related defect spin system for diamond.
  
−
[[read_jeol_phase_cycle.m]] - parses JEOL phase cycle specification.
+
[[diamond_p1.m]] - P1 centre spin system for diamond.
  
−
[[read_pdb_nuc.m]] - reads PDB data for nucleic acids.
+
[[diamond_p1_13c.m]] - P1 centre spin system with 13C neighbours in diamond.
  
−
[[read_pdb_pro.m]] - reads PDB data for proteins.
+
[[diamond_r2.m]] - R2 self-interstitial spin system for diamond.
  
−
[[read_bmrb.m]] - reads BMRB data for proteins.
+
[[diamond_siv0.m]] - SiV0 spin system for diamond.
  
−
[[s2spinach.m]] – reads SIMPSON spin system specification and converts it into Spinach format.
+
[[diamond_ti.m]] - titanium-related defect spin system for diamond.
  
−
[[strychnine.m]] – returns Spinach input structures for the spin system of strychnine.
+
[[diamond_vacancy.m]] - vacancy-family defect spin systems for diamond.
  
−
[[v2spinach.m]] - Varian NMR data import.
+
[[fatty_acid.m]] - a spin system approximating a fatty acid chain.
 +
 
 +
[[lactate.m]] - 13C-labelled lactate spin system.
  
−
[[x2spinach.m]] - reads SpinXML files and forms Spinach data structures.
+
[[strychnine.m]] - strychnine spin system.
  
 
==Data export and plotting==
 
==Data export and plotting==
Line 64: Line 108:
  
 
[[fid2ascii.m]] – writes out 1D, 2D and 3D free induction decays generated by Spinach as ASCII files.
 
[[fid2ascii.m]] – writes out 1D, 2D and 3D free induction decays generated by Spinach as ASCII files.
 +
 +
[[fid2pipe.m]] – exports phase-sensitive 2D free induction decays into native NMRPipe time-domain files.
 +
 +
[[fig2tiles.m]] - combines Matlab figure files into a single tiled figure.
  
 
[[int_2d.m]] – 2D spectral integration utility.
 
[[int_2d.m]] – 2D spectral integration utility.
Line 84: Line 132:
  
 
[[slice_2d.m]] – displays slices of 2D spectra.
 
[[slice_2d.m]] – displays slices of 2D spectra.
 +
 +
[[stack_2d.m]] - Stack plotting utility for 2D NMR spectra.
  
 
[[volplot.m]] – volumetric ploting.
 
[[volplot.m]] – volumetric ploting.
Line 91: Line 141:
 
[[zoom_3d.m]] - zooming into 3D data cubes.
 
[[zoom_3d.m]] - zooming into 3D data cubes.
  
−
==Pulse sequence import==
+
==Microfluidic mesh import and plotting==
−
[[jeol.m]] - parses and simulates 1D and 2D JEOL pulse sequences.
+
[[comsol_conc.m]] - Imports ASCII 2D concentration files produced by COMSOL.
  
−
[[read_jeol_parameters.m]] - parameter import from JEOL pulse sequence files.
+
[[comsol_import.m]] - Imports COMSOL mesh and velocity data.
  
−
[[read_jeol_sequence.m]] - pulse sequence import from JEOL pulse sequence files.
+
[[comsol_mesh.m]] - Imports ASCII 2D mesh files produced by COMSOL.
  
−
[[translate_jeol_parameters.m]] - JEOL to Spinach parameter translation.
+
[[comsol_velo.m]] - Imports ASCII 2D flow velocity files produced by COMSOL.
  
−
[[translate_jeol_phase_cycle.m]] - returns operators for a JEOL phase cycle.
+
[[conc_plot.m]] - 2D microfluidic concentration plotting function.
  
−
[[translate_jeol_sequence.m]] - JEOL to Spinach pulse sequence translation.
+
[[mesh_crop.m]] - 2D microfluidic mesh cropping.
  
−
==Artefact removal==
+
[[mesh_inact.m]] - Marks 2D microfluidic mesh vertices as inactive.
−
[[destreak.m]] – reduces streak artefacts in 2D and 3D NMR spectra.
+
 
 +
[[mesh_vorn.m]] - Voronoi tessellation of a microfluidic mesh.
 +
 
 +
[[mesh_plot.m]] - 2D microfluidic mesh plotting function.
 +
 
 +
[[mesh_preplot.m]] - 2D microfluidic mesh preprocessing for drawing.
 +
 
 +
==Miscellaneous data processing==
 +
[[autophase.m]] - Chebyshev autophasing of 1D NMR data
 +
 
 +
[[destreak.m]] - reduces streak artefacts in 2D and 3D NMR spectra.
 +
 
 +
[[lpredict.m]] - forward linear prediction.
 +
 
 +
[[tikhonov.m]] - Tikhonov regularised positive solution to K*x=y
 +
 
 +
[[tikhoind.m]] - Tikhonov regularised indeterminate solution to K*x=y
  
 
==External calls and interfaces==
 
==External calls and interfaces==
 +
[[awg_interface.m]] - Bruker SpinJet AWG interface.
 +
 
[[bootstrap.m]] - creates an empty spin_system structure that allows many ''Spinach'' functions to be used externally.
 
[[bootstrap.m]] - creates an empty spin_system structure that allows many ''Spinach'' functions to be used externally.
 +
 +
[[gslice.m]] - Gaussian geometry scan log slicing
  
 
[[py_run.m]] - Bruker Xepr python script execution.
 
[[py_run.m]] - Bruker Xepr python script execution.
  
−
[[awg_interface.m]] - Bruker SpinJet AWG interface.
+
[[guess_csa_pro.m]] - Guesses reasonable amide bond nitrogen and carbon CSA tensors (anisotropic parts only), given the local protein geometry.
 +
 
 +
[[guess_j_nuc.m]] - Assigns J-couplings in nucleic acids from atomic coordinates using semi-empirical estimates.
 +
 
 +
[[guess_j_pro.m]] - A reasonable attempt at a function that guesses and assigns all J-couplings in a protein.
 +
 
 +
[[retrieve_file.m]] - Retrieves a file from an HTTPS link and stores it in a user-specified directory.
  
 +
[[spinach2hiper.m]] - Exports phase-modulated optimal control waveforms into the format expected by Graham Smith's HiPER instrument.
  
−
''Version 2.5, authors: [[Ilya Kuprov]]''
+
''Version 2.9, authors: [[Ilya Kuprov]]''

Latest revision as of 10:10, 30 August 2026

Spinach is not intended to be a data processing package. The functions listed below assist in importing simulation settings and exporting simulation results into formats that are readable to data processing software.

Interaction visualisation

cst_display.m – chemical shielding tensors and their eigensystems.

efg_display.m - electric field gradient tensors and their eigensystems.

hfc_display.m – hyperfine coupling tensors and their eigensystems.

Data import

b2spinach.m - Bruker NMR data import.

c2spinach.m - Reads CASTEP .magres files.

cyprinol.m - Returns Spinach input structures for the spin system of cyprinol.

fatty_acid.m - A reasonable approximation to a fatty acid spin system.

gissmo2spinach.m - Reads GISSMO XML files.

gparse.m - A parser for Gaussian03 and Gaussian09 calculation logs.

g2spinach.m - Converts gparse.m output into Spinach input structures.

karplus_fit.m - Performs Karplus coefficient estimation from a Gaussian J-coupling scan.

killcross.m - Zeroes the specified rows and columns of a matrix.

killdiag.m - Zeroes out the diagonal of a 2D spectrum.

methyl_group.m - Coordinates for the four atoms of a methyl group.

merge_inp.m - Merges multiple sys and inter structures into one.

nuclacid.m - Nucleic acid data import from PDB and BMRB data.

oparse.m - A parser for ORCA logs.

ocparse.m - A parser for ORCA cubes.

parsexml.m - Converts an XML file into a Matlab structure.

protein.m - Protein data import from PDB and BMRB data.

read_pdb_nuc.m - Reads PDB data for nucleic acids.

read_pdb_pro.m - Reads PDB data for proteins.

read_bmrb.m - Reads BMRB data for proteins.

v2spinach.m - Varian NMR data import.

weblab2nqi.m - Converts the Weblab one-cone model parameters into NQI tensors used by Spinach.

x2spinach.m - Reads SpinXML files and forms Spinach data structures.

Standard spin systems

allyl_pyruvate.m - allyl pyruvate spin system.

dac_reaction.m - Diels-Alder cycloaddition system.

diamond_co.m - cobalt-related defect spin system for diamond.

diamond_gev0.m - GeV0 spin system for diamond.

diamond_n2vm.m - N2V- spin system for diamond.

diamond_n_inter.m - nitrogen interstitial spin system for diamond.

diamond_ni.m - nickel-related defect spin system for diamond.

diamond_nv0_es.m - NV0 excited-state spin system for diamond.

diamond_nvm_gs.m - NV centre ground state spin system for diamond.

diamond_ov0.m - neutral oxygen-vacancy centre ground state spin system for diamond.

diamond_p.m - phosphorus-related defect spin system for diamond.

diamond_p1.m - P1 centre spin system for diamond.

diamond_p1_13c.m - P1 centre spin system with 13C neighbours in diamond.

diamond_r2.m - R2 self-interstitial spin system for diamond.

diamond_siv0.m - SiV0 spin system for diamond.

diamond_ti.m - titanium-related defect spin system for diamond.

diamond_vacancy.m - vacancy-family defect spin systems for diamond.

fatty_acid.m - a spin system approximating a fatty acid chain.

lactate.m - 13C-labelled lactate spin system.

strychnine.m - strychnine spin system.

Data export and plotting

axis_1d.m - axis ticks for plotting 1D spectra.

bwr_cmap.m - blue-white-red colour map with white at zero.

crop_2d.m - Crops 2D spectra to user-specified ranges.

cylgrid.m - cylindrical axis system.

fid2ascii.m – writes out 1D, 2D and 3D free induction decays generated by Spinach as ASCII files.

fid2pipe.m – exports phase-sensitive 2D free induction decays into native NMRPipe time-domain files.

fig2tiles.m - combines Matlab figure files into a single tiled figure.

int_2d.m – 2D spectral integration utility.

molplot.m – stick plots of molecules.

mri_2d_plot.m - MRI image plotting with a black-and-white colour map.

plot_1d.m – 1D spectral plotting utility.

plot_2d.m – 2D spectral plotting utility.

plot_3d.m – 3D spectral plotting utility.

plot_uf.m - 2D ultrafast spectra plotting utility.

s2json.m - writes out JSON files that can be read by MestreNova.

scale_figure.m - Scales the current figure.

slice_2d.m – displays slices of 2D spectra.

stack_2d.m - Stack plotting utility for 2D NMR spectra.

volplot.m – volumetric ploting.

write_movie.m - rotation movies for 3D plots.

zoom_3d.m - zooming into 3D data cubes.

Microfluidic mesh import and plotting

comsol_conc.m - Imports ASCII 2D concentration files produced by COMSOL.

comsol_import.m - Imports COMSOL mesh and velocity data.

comsol_mesh.m - Imports ASCII 2D mesh files produced by COMSOL.

comsol_velo.m - Imports ASCII 2D flow velocity files produced by COMSOL.

conc_plot.m - 2D microfluidic concentration plotting function.

mesh_crop.m - 2D microfluidic mesh cropping.

mesh_inact.m - Marks 2D microfluidic mesh vertices as inactive.

mesh_vorn.m - Voronoi tessellation of a microfluidic mesh.

mesh_plot.m - 2D microfluidic mesh plotting function.

mesh_preplot.m - 2D microfluidic mesh preprocessing for drawing.

Miscellaneous data processing

autophase.m - Chebyshev autophasing of 1D NMR data

destreak.m - reduces streak artefacts in 2D and 3D NMR spectra.

lpredict.m - forward linear prediction.

tikhonov.m - Tikhonov regularised positive solution to K*x=y

tikhoind.m - Tikhonov regularised indeterminate solution to K*x=y

External calls and interfaces

awg_interface.m - Bruker SpinJet AWG interface.

bootstrap.m - creates an empty spin_system structure that allows many Spinach functions to be used externally.

gslice.m - Gaussian geometry scan log slicing

py_run.m - Bruker Xepr python script execution.

guess_csa_pro.m - Guesses reasonable amide bond nitrogen and carbon CSA tensors (anisotropic parts only), given the local protein geometry.

guess_j_nuc.m - Assigns J-couplings in nucleic acids from atomic coordinates using semi-empirical estimates.

guess_j_pro.m - A reasonable attempt at a function that guesses and assigns all J-couplings in a protein.

retrieve_file.m - Retrieves a file from an HTTPS link and stores it in a user-specified directory.

spinach2hiper.m - Exports phase-modulated optimal control waveforms into the format expected by Graham Smith's HiPER instrument.

Version 2.9, authors: Ilya Kuprov