#!/usr/bin/env python # coding: utf-8 # ## Initial imports from scm.base import ChemicalSystem from scm.plams import AMSJob, Settings, view # ## System cs = ChemicalSystem( """ System Atoms O 1.48603879 -1.49561627 0.0 C 1.29751002 -0.30552432 0.0 O 0.07403584000000001 0.25228979 0.0 C -1.02449892 -0.67494471 0.0 C -2.30056502 0.12358769 0.0 C 2.36905363 0.74347075 0.0 H -0.9418758699999999 -1.31519741 0.88039373 H -0.9418758699999999 -1.31519741 -0.88039373 H -2.36617127 0.7582087199999999 0.88525259 H -3.15628689 -0.55419212 0.0 H -2.36617127 0.7582087199999999 -0.88525259 H 3.34355252 0.26293272 0.0 H 2.26362714 1.38098693 0.87932777 H 2.26362714 1.38098693 -0.87932777 End End """ ) view(cs, guess_bonds=True, height=200, width=200, picture_path="picture1.png") # ## Job settings: DFT and NMR # # There are three calculations: # # 1. A DFT calculation with a main results file ``adf.rkf``. We must set the ``Save TAPE10`` input option. The ``TAPE10`` file is later used by the ``$AMSBIN/nmr`` program. # # 2. An ``$AMSBIN/cpl`` calculation. This program *modifies* ``adf.rkf`` # # 3. An ``$AMSBIN/nmr`` calculation. This program reads ``TAPE10`` and *modifies* ``adf.rkf``. # # In the end, all results are stored on ``adf.rkf``. # # There is no PLAMS job for the ``$AMSBIN/cpl`` and ``$AMSBIN/nmr`` programs. Instead, we set up the calculation explicitly in the ``settings.runscript.postamble_lines`` option. # DFT Settings s = Settings() s.input.ams.Task = "SinglePoint" s.input.adf.Basis.Type = "TZ2P-J" s.input.adf.Basis.Core = "None" s.input.adf.Save = "TAPE10" s.input.adf.xc.GGA = "OPBE" s.input.adf.Symmetry = "NOSYM" s.input.adf.NumericalQuality = "Good" from typing import Mapping, List def get_cpl_script(s: Mapping) -> List[str]: ret = ( ['"$AMSBIN/cpl" < List[str]: ret = ( ['"$AMSBIN/nmr" <