Error using cardamom with easyspin-6.0.0-dev.24

A place to report and discuss potential bugs
Post Reply
matthias
Newbie
Posts: 5
Joined: Mon Nov 24, 2014 6:59 am

Error using cardamom with easyspin-6.0.0-dev.24

Post by matthias »

Hello,
I tried to use cardamom with the easyspin-6.0.0-dev.24 version with the scripts below, trying to calculate the EPR spectrum from a hindered Brownian diffusion model fitted to an MD trajectory and got the output
Experimental settings:
field sweep, mw frequency 9.4212 GHz
field range (mT): min 289.01, max 389.01, center 339.01, width 100
using MD trajectory data
Reference to non-existent field 'dihedrals'.

Error in cardamom
.
This is the matlab Live-Script I have used:

Code: Select all

clear;
%Define Spin System
Sys.S = 1/2;
Sys.Nucs = '14N';
Sys.g = [2.0099 2.0055 20010];
Sys.A = [4.5 29 107.5];
Sys.lwpp = [0.0087 0.8554];

%Define experimental parameters
Exp.mwFreq = 9.4212;
Exp.CenterSweep = [339.010 100];
Exp.nPoints = 2000;

%Define simulation parameter for quantum propagation
Par.Model = 'MD-HBD';
Par.Dt = 1 * 10^(-9);
Par.nSteps = 250;
Par.nTraj = 1;
Par.OriStart = [0,0,0];
Par.Orients = [0,0,0];

%Define Simulation Options
Opt.Verbosity = 1;
Opt.Method = 'fast';
Opt.specCon = true;
%Load MD Data
load('MD_250K_1ps.mat')

%Calculated EPR Spectrum
[B,spc,FID,t] = cardamom(Sys,Exp,Par,Opt,MD)
The MD_250K_1ps.mat file was created from raw data by the Live Script

Code: Select all

clear;
load('local_frame_250K_1psTimeStep.mat');
MD.dt = 1*10^(-12);
nTrajec = 1;
[nSteps,m] = size(xm);
MD.FrameTraj = zeros(3,3,nTrajec,nSteps);
MD.RProtDiff = zeros(3,3,nTrajec,nSteps);


for ii = 1:nSteps
    ex = xm(ii,:)';
    ey = ym(ii,:)';
    ez = cross(ex,ey);
    ey = cross(ez,ex);
    ex = ex / norm(ex);
    ey = ey / norm(ey);
    ez = ez / norm(ez);
    MD.FrameTraj(:,1,1,ii) = ex;
    MD.FrameTraj(:,2,1,ii) = ey;
    MD.FrameTraj(:,3,1,ii) = ez; 
    
    MD.RProtDiff(:,1,1,ii) = [1,0,0]';
    MD.RProtDiff(:,2,1,ii) = [0,1,0]';
    MD.RProtDiff(:,3,1,ii) = [0,0,1]';

end
MD.FrameTrajwrtProt = MD.FrameTraj
MD.removeGlobal = true;
MD.dihedral = [];

save('MD_250K_1ps','MD')
The 'local_frame_250K_1psTimeStep.mat' file contains the coordinate trajectories of the x-, y- and z- axis of the nitroxide radical in the 'xm', 'ym' and 'zm' matrices calculated by some MD calculations.

Is this a bug or did I do something wrong?

I know this is still a dev version, but I very much appreciate the implementation of the new MD trajectory features and I am really looking forward to use them!
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by Stefan Stoll »

This looks like a bug. Can you please post the full error message?
matthias
Newbie
Posts: 5
Joined: Mon Nov 24, 2014 6:59 am

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by matthias »

Sure, running the posted code as a matlab script gives the following comomand line output:
Experimental settings:
field sweep, mw frequency 9.4212 GHz
field range (mT): min 289.01, max 389.01, center 339.01, width 100
using MD trajectory data
Reference to non-existent field 'dihedrals'.

Error in cardamom

Error in Calculate_250K_HBD_MD (line 30)
[B,spc,FID,t] = cardamom(Sys,Exp,Par,Opt,MD)
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by Stefan Stoll »

Can you please provide the MD_250K_1ps.mat file, so we can reproduce the error?
matthias
Newbie
Posts: 5
Joined: Mon Nov 24, 2014 6:59 am

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by matthias »

Yes, here it is.
Attachments
MD_250K_1ps.mat
(3.29 MiB) Downloaded 246 times
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by Stefan Stoll »

This might just be a typo: Your MD structure has a field MD.dihedral, but the field should be named MD.dihedrals.
matthias
Newbie
Posts: 5
Joined: Mon Nov 24, 2014 6:59 am

Re: Error using cardamom with easyspin-6.0.0-dev.24

Post by matthias »

Oh, thank you! This was the mistake. Sorry for the effort.

Post Reply