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

From Spinach Documentation Wiki
Jump to: navigation, search
(→‎Data import)
(removed index entry for deleted function bloch_sph_plot.m (removed per IK instruction 2026-08-30))
 
(80 intermediate revisions by 2 users 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==
−
[[gparse.m]] – a parser for Gaussian03 and Gaussian09 calculation logs.
+
[[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.
  
−
[[g2spinach.m]] – converts [[gparse.m]] output into ''Spinach'' input structures.
+
[[diamond_ti.m]] - titanium-related defect spin system for diamond.
  
−
[[karplus_fit.m]] – performs Karplus coefficient estimation from a Gaussian J-coupling scan.
+
[[diamond_vacancy.m]] - vacancy-family defect spin systems for diamond.
  
−
[[nuclacid.m]] - nucleic acid data import from PDB and BMRB data.
+
[[fatty_acid.m]] - a spin system approximating a fatty acid chain.
  
−
[[oparse.m]] - a parser for ORCA logs.
+
[[lactate.m]] - 13C-labelled lactate spin system.
  
−
[[ocparse.m]] - a parser for ORCA cubes.
+
[[strychnine.m]] - strychnine spin system.
  
−
[[parsexml.m]] - converts an XML file into a Matlab structure.
+
==Data export and plotting==
  
−
[[protein.m]] – protein data import from PDB and BMRB data.
+
[[axis_1d.m]] - axis ticks for plotting 1D spectra.
  
−
[[s2spinach.m]] – reads SIMPSON spin system specification and converts it into Spinach format.
+
[[bwr_cmap.m]] - blue-white-red colour map with white at zero.
  
−
[[strychnine.m]] – returns Spinach input structures for the spin system of strychnine.
+
[[crop_2d.m]] - Crops 2D spectra to user-specified ranges.
  
−
[[x2spinach.m]] - reads SpinXML files and forms Spinach data structures.
+
[[cylgrid.m]] - cylindrical axis system.
  
−
==Data export==
 
 
[[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.
 +
 +
[[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.
 
[[s2json.m]] - writes out JSON files that can be read by MestreNova.
  
−
==Artefact removal==
+
[[scale_figure.m]] - Scales the current figure.
−
[[destreak.m]] – reduces streak artefacts in 2D and 3D NMR spectra.
+
 
 +
[[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.1, authors: [[Ilya Kuprov]]''
+
''Version 2.9, authors: [[Ilya Kuprov]]''

Latest revision as of 09: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