A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Chemistry in the Graduate Division of the University of California, Berkeley. List of Figures......Page 10 List of Tables......Page 13 Introduction......Page 16 Computer Mechanics......Page 19 Data Types......Page 22 The Object......Page 23 Syntax......Page 24 Motivations......Page 28 Stacks......Page 29 An Array Object and Stacks......Page 30 Expression Template Implementation......Page 34 Optimizing For Hardware......Page 42 Basic Computer Architecture......Page 45 A Faster Matrix Multiplication......Page 52 Classical Mechanics......Page 57 Bloch Equation Magnetic Fields......Page 58 Quantum Mechanics......Page 74 Rotations......Page 75 Rotational Frames......Page 79 The Hamiltonians......Page 82 Quantum......Page 88 Classical......Page 89 Eigenvalue Problem......Page 91 ODE solvers......Page 93 The Direct Method......Page 97 Periodicity and Propagator Reduction......Page 98 Eigenspace......Page 104 Periodicity and Eigen--Space methods......Page 110 Powder Average Integration......Page 115 Conclusions and Comments......Page 118 Introduction......Page 120 Theoretical Evolutions (TE)......Page 121 Existing NMR Tool Kits......Page 123 BlochLib Design......Page 124 Existing Numerical Tool Kits......Page 125 Experimental and Theoretical Evolutions for NMR simulations......Page 126 BlochLib Layout......Page 127 Drawbacks......Page 136 Various Implementations......Page 138 Solid......Page 139 Classical Program: Magnetic Field Calculators......Page 144 Classical Programs: Bloch Simulations......Page 146 Conclusions......Page 155 Introduction......Page 156 Rotor Synchronization......Page 157 Average Hamiltonian......Page 158 Recoupling RSS......Page 160 C7......Page 165 Removable of Higher Order Terms......Page 166 The Sub--Units......Page 170 The Measure......Page 171 Algorithmic Flow......Page 173 Sequence Measures......Page 176 Transfer Efficiencies......Page 200 Conclusions......Page 211 Future Expansions......Page 216 Evolutionary Algorithms (EA)......Page 217 Neural Networks......Page 224 Final Remarks......Page 226 Bibliography......Page 228 C++ Template code used to generate prime number at compilation......Page 240 C++ Template meta-program to unroll a fixed length vector at compilation time......Page 241 C++ code for performing a matrix multiplication with L2 cache blocking and partial loop unrolling.......Page 243 An MPI master/slave implimentation framework......Page 245 C++ class for a 1 hidden layer Fully connected back--propagation Neural Network......Page 247 Mathematica Package to generate Wigner Rotation matrices and Spin operators.......Page 254 Rational Reduction C++ Class......Page 259 Optimized static Hamiltonian FID propogation......Page 267 -COMPUTE C++ Class......Page 268 Solid configuration files......Page 278 Magnetic Field Calculator input file......Page 281 Example Classical Simulation of the Bulk Susceptibility......Page 282 Example Classical Simulation of the Modulated Demagnetizing Field......Page 289 List of Figures 10 List of Tables 13 Introduction 16 Computer Mechanics 19 Data Types 22 The Object 23 Syntax 24 Expression Templates 28 Motivations 28 Stacks 29 An Array Object and Stacks 30 Expression Template Implementation 34 Optimizing For Hardware 42 Basic Computer Architecture 45 A Faster Matrix Multiplication 52 NMR Forms 57 Classical Mechanics 57 Bloch Equation Magnetic Fields 58 Quantum Mechanics 74 Rotations 75 Rotational Frames 79 The Hamiltonians 82 NMR Initial Conditions 88 Quantum 88 Classical 89 NMR Algorithms 91 Classical Algorithms 91 Eigenvalue Problem 91 ODE solvers 93 Quantum Algorithms 97 The Direct Method 97 Periodicity and Propagator Reduction 98 Eigenspace 104 Periodicity and Eigen--Space methods 110 Non-periodic Hamiltonians 115 Powder Average Integration 115 Conclusions and Comments 118 BlochLib 120 Introduction 120 The Abstract NMR Simulation 121 Experimental Evolutions (EE) 121 Theoretical Evolutions (TE) 121 Existing NMR Tool Kits 123 Why Create a new Tool Kit? 124 BlochLib Design 124 Existing Numerical Tool Kits 125 Experimental and Theoretical Evolutions for NMR simulations 126 BlochLib Layout 127 Drawbacks 136 Various Implementations 138 Solid 139 Classical Program: Magnetic Field Calculators 144 Classical Programs: Bloch Simulations 146 Conclusions 155 Massive Permutations of Rotor Synchronized Pulse Sequences 156 Introduction 156 Rotor Synchronization 157 Background Theory 158 Average Hamiltonian 158 Recoupling RSS 160 C7 165 Removable of Higher Order Terms 166 Permutations 170 The Sub--Units 170 The Measure 171 Algorithmic Flow 173 Data and Results 176 Sequence Measures 176 Transfer Efficiencies 200 Conclusions 211 Future Expansions 216 Evolutionary Algorithms (EA) 217 Neural Networks 224 Final Remarks 226 Bibliography 228 Auxillary code 240 General C++ code and examples 240 C++ Template code used to generate prime number at compilation 240 C++ Template meta-program to unroll a fixed length vector at compilation time 241 C++ code for performing a matrix multiplication with L2 cache blocking and partial loop unrolling. 243 An MPI master/slave implimentation framework 245 C++ class for a 1 hidden layer Fully connected back--propagation Neural Network 247 NMR algorithms 254 Mathematica Package to generate Wigner Rotation matrices and Spin operators. 254 Rational Reduction C++ Class 259 Optimized static Hamiltonian FID propogation 267 -COMPUTE C++ Class 268 BlochLib Configurations and Sources 278 Solid configuration files 278 Magnetic Field Calculator input file 281 Quantum Mechanical Single Pulse Simulations 282 Example Classical Simulation of the Bulk Susceptibility 282 Example Classical Simulation of the Modulated Demagnetizing Field 289 C++,simulation,nuclear magnetic resonance,solids state NMR,dipolar couplings,isotropic,chemical shift anisotropy,recoupling,permutations