Scaled Hypersphere Search Method By Timm Reumann Prof
Scaled Hypersphere Search Method By Timm Reumann Prof. Dr. K. K. Baldridge Organic Chemistry Institute, University of Zürich, Switzerland
Potentail Energy (Hyper-) Surface (PES) PES: Potential Energy Surface
Potential Energy (Hyper-) Surface (PES) Energy TS 1 TS 2 GS 1 GS 0 GS 2 Reaction Coordinate Ø Molecule in Ground State (GS): Stable Equilibrium of Forces Ø Molecule in Transition State (TS): Instable Equilibrium of Forces, 2 directions downwards Ø Reaction Path: Valley on PES connecting 2 GSs
Chemical Bond and Electron Clouds Shape of Molecule => Energy? Ø Electrostatic Interaction between Electrons (--) => Repulsion Ø Electrostatic Interaction between Atomic Cores (++) => Repulsion Ø Electrostatic Interaction between Electrons and Atomic Cores (-+) => Repulsion Ø Overlap Interaction => Attraction (usually) 1. Bond Stretching: 2. Angle Bending:
E. g. Water: some few ones
Motivation: Ø Finding all (relevant) reaction pathways for a given molecule (e. g. catalyst) e. g. : modifying a catalyst to favor a specific reaction unfortunately also a side reaction favored now survey over Ø Prioritizing reaction pathways Without Specific Knowledge about given System (e. g. Initial Guess)
But: • Initial guess of TS or Pathway or further GS still required by established methods (e. g. nudged elastic band string methods 1) • OR: systematic exploration of all possible reaction pathways starting at one GS 1. No general formula for energy of a molecule available (esp. at TS) Ø Iteration on single electron clouds and their total charge distribution electron clouds of minimal energy and energy itself (Self-Consistent-Field-Proc, SCF) 2. Calculations of 1 st and 2 nd derivatives of energy on atoms to follow reaction path Ø requires converged electron clouds => SCF-Procedure beforehand (esp. 2 nd derivates computationally expensive) 3. Changing one coordinate affects dependency of energy on another coordinate (Energy coupling between coordinates)
Harmonic Approximation of Energy (computationally cheap) Instead of 1 st and 2 nd Derivatives Ø Describing Chemical Bond as a Spring: F = -kf (x – x 0) => Eharm = -0. 5 kf (x – x 0)2 Ø Eharm ∞ for x ∞ unbreakable bonds no chemical reaction Since Chemical Bonds ARE breakable: 0 x Eharm E Dissociation ESCF ΔE GS TS GS x Ø Downwards Deviation (ΔE) of “true” energy (ESCF) from harmonic energy (Eharm) potential reaction path
Exploration of PES in Normal Coordinates II Instead of Real Space Coordinates Energy Coupling between Real Space Coordinates: For example: Etot = E(X 1, …, Y 2, …, Z 3) + E(X 2, …, Y 3 ) + … • Stretching a bond Etot = E(L 1, ϕ 1) + E(ϕ 1, L 2) + … + E(φ1, ϕ 1, L 2, L 3, …) + … Weaker bond L : Bond Length ; ϕ, φ : Bending, Torsion Angle O H H Nd SCF-Energy Calculations required Real Space Coord. 1 Bending that bond now easier Real Space Coord. 2
Exploration of PES in Normal Coordinates II O H Instead of Real Space Coordinates Decoupling in Normal Coordinates Of Vibrational Modes: H ei n 1 4080 n 2 1960 n 3 4080 • smart combinations of basic atomic displacements compensating each others’ influences on energy terms • each mode represented by basis vector ni in Etot ≈ e 1 n 12 + e 2 n 22 + … + en nn 2 Only N d Sample Points Necessary Normal Coord. 1 normal coordinate space at least around Ground State Maeda, S. ; Ohno, K. ; Chemical Physics Letters, 2003, 381, 177 Normal Coord. 2
Overall Procedure Radius of Hypersphere: Rk = Rk-1 + ΔR GS Molecule G Vibrational Modes + Eigenvalues Really New GS Molecules Comparison with old GS Molecules Exploration of Spherical PES Points of locally lowest ΔE Deformed Molecules on Reaction Paths TS region reached? G Eharm E New GS Molecules Dissociation ESCF ΔE Checking d. E/dx, d 2 E/dx 2 Yes Downhill Walks G Optimization to TS G Transition States GS TS GS q G Done with GAMESS-US No
Exploration of Spherical PES Scaled Normal Coordinate Space Real Coordinate Space Radius Rk Vibrational Modes vi Energy Values ei Scaling Generation of Grid GS Geometry x. GS qi = vi ei 0. 5 Q = {q 1, …, qn}T Points on Hypersphere e. g. : n 1 xi = Q-1 n + x. GS e. g. : n 3 n 2 Deformations of GS xi e. g. : O H H X 0. 09 -2. 46 5. 66 Y -1. 02 -2. 70 -2. 60 Z 0. 00
Scaled Normal Coordinate Space Points with ΔE-Values e. g. : n 1 Real Coordinate Space Eharm = 0. 5 Rk 2 SCF Runs ΔE = ESCF - Eharm ESCF n 3 n 2 ΔE > 0 ΔE < 0 Interpolation of ΔE xi = Q-1 n + x 0 Local Minima of ΔE Deformed Molecules xi on Reaction Paths
Everything much Easier Now Or? ? ? Ø Number of Sample Point for Molecules * Molecule ♯ of Vib. Modes ♯ in Real Space ♯ in norm. Coord. Space Water, 3 atoms 3 103 630 Methanal, 4 atoms 6 106 60630 Ø Vibrational Modes calculated at the GS only valid for the GS Ø Going away from GS (deforming molecule) Vibrational Modes more and more invalid increasing energy coupling between normal coordinates Ø Complete SCF-energy calculation for each point necessary Ø Computational Time: few seconds for simple molecules (e. g. water) few hours for big ones (e. g. Organic Platinum-Komplex) * Maeda, S. ; Ohno, K. ; Chemical Physics Letters, 2003, 381, 177
Submission of Jobs Folder of Input Files Resource Requests ♯of Cores, Memory, Wall Time Grid Interface Cluster 1 Cluster 2 Cluster 3 Grid Interface Folder of Output Files Cluster 4
GAMESS General Atomic and Molecular Electronic Structure System Ø 2 Versions of GAMESS: GAMESS-US (free) and GAMESS-UK (commercial) Ø multipurpose Quantum Chemistry Package Energies, Forces, Vibrational Modes on various theory levels, Properties of Molecules … Ø used here: Optimization of GS and TS Molecules, Calculation of Vibrational Modes and SCF-Energies Distributed Data Interface (DDI): Ø communication layer for parallel execution of GAMESS Ø manages dynamic memory allocation and data exchange between single cores and processes Ø does I/O-operations for each single calculation process
SCF-Procedure Ø optimizing shapes of electron clouds => lowest energy Ø energy of single cloud depends on shapes of all other clouds due to electrostatic interaction (and exchange interaction) Knowledge about all other clouds required to determine each single one Initial Electron Clouds Optimization Eigenvector Determination Summing up No Done Yes ΔE or ΔCharge. Dist. Below predefined value Total Charge Distribution
Problems with SCF-Runs on large Number of Jobs (e. g. 2000) 1) Automated Error Treatment: Ø inappropriate input parameters Ø allocated resources exceeded Ø node / cluster crashed Ø convergence problems of SCF-Procedure 2) Prediction of Resource Requirements: Ø Memory, Number of CPUs Ø Harddisk Space Ø Wall Clock Time e. g. : 3 - 25 MB per Core, 16 Cores e. g. : 6 – 30546 MB e. g. : 1 – 17 sec very small molecules (4 – 20 atoms)
Automated Error Treatment 1. Separation of Jobs (successful, failure type 1, 2, …) Ø Inspection of output files for (error-) messages e. g. : --------------------ddikick. x: exited gracefully. real 0 m 8. 210 s user 0 m 0. 003 s sys 0 m 0. 006 s finish time: Mon Jul 11 22: 14: 07 CEST 2011 Read from remote host compute-1 -412: Connection reset by peer Failed creating /state/partition 1/grid 027/121792 on compute-1 -412 Ø Sorting them according to found messages
Some more Examples: Initiating 16 compute processes on 7 nodes to run the following command: /share/apps/gamess-2010 R 1 -ethernet-gfortran//gamess. 00. x INP 00018 ddikick. x: Timed out while waiting for DDI processes to check in. ddikick. x: Fatal error detected. The error is most likely to be in the application, so check for input errors, disk space, memory needs, application bugs, etc. ddikick. x will now clean up all processes, and exit. . . II, JST, KST, LST =318 1 1 1 NREC = 3768 INTLOC = 5381 PWRT: NODE 0 ENCOUNTERED I/O ERROR WRITING UNIT 8 EXECUTION OF GAMESS TERMINATED -ABNORMALLY- AT Wed Jul 13 10: 08: 36 2011 4613448 WORDS OF DYNAMIC MEMORY USED CPU 0: STEP CPU TIME= 28. 41 TOTAL CPU TIME= 57. 7 ( 1. 0 MIN) TOTAL WALL CLOCK TIME= 95. 6 SECONDS, CPU UTILIZATION IS 60. 40% DDI Process 0: error code 911 ddikick. x: application process 0 quit unexpectedly. ddikick. x: Fatal error detected. The error is most likely to be in the application, so check for input errors, disk space, memory needs, application bugs, etc. ddikick. x will now clean up all processes, and exit. . .
Automated Error Treatment 2. Case Specific Treatment 1) Successful Job Extraction of SCF-Energy 2) Inappropriate input parameters correction by human being e. g. : “ILLEGAL …” in output file 3) Allocated Resources exceeded Resubmission of Job with larger Resources How to avoid repetition of entire computation (e. g. SCF-Procedure)? 4) node / cluster crashed Resubmission of Job on another cluster (? )
Automated Error Treatment Convergence Problems How to make the computer recognizing Convergence Problems?
Prediction of Resource Requirements 1. Memory and Number of Cores Allocated for each Core: Ø Memory for Replicated Data (MEMreplic) Ø Memory for Shared Data (MEMshared) Node Core 1 Core 2 SCF-Run Ø Using several cores to accumulate enough total memory: MEMshared + MEMreplic < available MEMCore MEMshared = total MEMshared / NCores DDI-Process HDD available MEMCore = total MEMCore – MEMGAMESS+OS Ø more cores faster run Ø fewer cores memory overflow e. g. : MEMGAMESS+OS ≈ 50 MB + 25 MB
Prediction of Resource Requirements 2. Speed up with Number of Cores Ø Communication limits linear speed up: 1 / Wall Clock Time SCF-Energy for Molecule with paired electrons Vibrational Modes for Molecule with unpaired electrons NCores Ø Waiting time in Queuing System
Prediction of Resource Requirements 3. Hard Disk Storage (HD): Ø Each node with its own HD (2 TB) accumulating HD space for single job using more nodes, i. e. cores Ø if HD space exceeded on 1 node entire job crashes - in the best case Otherwise System crashes, if GAMESS is not restricted to a Scratch Partition Ø Mainly Overlap- and Interaction Integrals of electron clouds of isolated atoms (at least in energy calculations) required HD ≈ NInt Bytes. Int max Nint = 1/sym 1/8 NBasisfunctions Ø But: Lots of Integrals almost =0 and neglected by GAMESS actual NInt << max NInt Ø fraction of ignored Integrals strongly depends on molecule
Prediction of Resource Requirements Check-Run Modus of GAMESS: Input File with all Settings One additional: Exetyp = Check GAMESS Output File with Estimates of MEMreplic , total MEMshared , actual Nint And some more stuff Ø Reliability not assessed yet How to test Check-Run Mode of GAMESS systematically?
Prediction of Resource Requirements 4. Wall Clock Time: Depends on: ØLevel of Theory (RHF ≤ DFT < MP 2 < CC… << Full-CI) Ø Size of Basis Set constituting the Electron Clouds Ø Number and Size of Atoms in Molecule And: Ø Number of required SCF-Cycles for given Molecule (almost) impossible to predict Benchmarks necessary to obtain Empirical Function for Wall Clock Time: WCT = f(input parameters)
2 Problems for you Ø Predicting Memory-, Core- and HD-Space Requirements: Testing Check-Run Mode of GAMESS systematically Ø Automated Recognition of Convergence Problems in SCF-Energy Calculation
Thank you for your Attention Suggestions?
- Slides: 29