<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Cart2mode.m</id>
	<title>Cart2mode.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Cart2mode.m"/>
	<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Cart2mode.m&amp;action=history"/>
	<updated>2026-10-02T18:12:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.15</generator>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Cart2mode.m&amp;diff=9873&amp;oldid=prev</id>
		<title>Kuprov: Document new Spinach 2.12 spin-boson functionality (PR 195)</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Cart2mode.m&amp;diff=9873&amp;oldid=prev"/>
		<updated>2026-08-06T04:38:02Z</updated>

		<summary type="html">&lt;p&gt;Document new Spinach 2.12 spin-boson functionality (PR 195)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:cart2mode.m}} __NOTOC__&lt;br /&gt;
Converts Cartesian derivatives of spin Hamiltonian parameters, as produced by electronic structure theory packages, into the derivatives with respect to dimensionless mode coordinates that the bosonic mode specification interface of [[create.m]] expects in the inter.modes.coupling_mod and inter.modes.zeeman_mod fields. The dimensionless coordinate of each mode is (a+a')/sqrt(2), and the Cartesian displacement that it produces on a degree of freedom with mass m is scaled by sqrt(hbar/(m*omega)), where omega is the angular frequency of the mode. The function therefore contracts the Cartesian derivative array with the mass-weighted normal mode eigenvector and applies the zero-point displacement scaling.&lt;br /&gt;
&lt;br /&gt;
Both first and second derivatives are supported: the first order case describes a linear modulation of a spin interaction by a single mode, and the second order case describes the bilinear Raman-type modulation by a pair of modes, or the quadratic modulation by one mode when the same eigenvector is supplied twice.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
     mode_derivs=cart2mode(cart_derivs,eigvecs,masses,frqs)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
     cart_derivs - first derivatives of an interaction with&lt;br /&gt;
                   respect to Cartesian displacements, in Hz&lt;br /&gt;
                   per Angstrom, an array of dimension&lt;br /&gt;
                   [d1 d2 3N] where N is the number of atoms&lt;br /&gt;
                   and the Cartesian degrees of freedom are&lt;br /&gt;
                   ordered [x1 y1 z1 x2 y2 z2 ...]; or second&lt;br /&gt;
                   derivatives in Hz per Angstrom squared, an&lt;br /&gt;
                   array of dimension [d1 d2 3N 3N]&lt;br /&gt;
 &lt;br /&gt;
     eigvecs     - orthonormal mass-weighted normal mode&lt;br /&gt;
                   eigenvector, a [3N 1] column vector for&lt;br /&gt;
                   the first order case; two such vectors&lt;br /&gt;
                   as a [3N 2] array for the second order&lt;br /&gt;
                   case&lt;br /&gt;
 &lt;br /&gt;
     masses      - atomic masses in unified atomic mass&lt;br /&gt;
                   units, an [N 1] column vector&lt;br /&gt;
 &lt;br /&gt;
     frqs        - mode frequency in Hz, a positive scalar&lt;br /&gt;
                   for the first order case; a [1 2] vector&lt;br /&gt;
                   for the second order case&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
     mode_derivs - derivatives with respect to dimensionless&lt;br /&gt;
                   mode coordinates, in Hz, a [d1 d2] array&lt;br /&gt;
                   to be placed into the corresponding cell&lt;br /&gt;
                   of inter.modes.coupling_mod (d1=3, d2=3)&lt;br /&gt;
                   or inter.modes.zeeman_mod (d1=1, d2=3)&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
# Raw Taylor derivatives are returned; the 1/2 factors of the Taylor expansion are applied by ''Spinach'' internally.&lt;br /&gt;
# Derivative data in wavenumbers or meV should be converted into Hz with [[icm2hz.m]] or [[mev2hz.m]] beforehand.&lt;br /&gt;
# Zero and negative frequency modes are rejected because their zero-point scaling is undefined.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[create.m]], [[mev2hz.m]], [[icm2hz.m]], [[kelvin2hz.m]], [[hamiltonian.m]], [[Spin system specification]], [[Kernel utilities]]&lt;br /&gt;
&lt;br /&gt;
''Version 2.12, authors: [[Ilya Kuprov]]''&lt;/div&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
</feed>