Skip to content

xtb_calculator_for_EStA_21012025_v3

esta.general.xtb_calculator_for_EStA_21012025_v3

!!-----------------------------------------------------------------------------!! ! interface to xTB code and extracting energy, position, gradient, ! and hessian (possibly) to EStA software

! author : skumar ! email: sonukumar.physics@gmail.com !!-----------------------------------------------------------------------------!!

XTB

XTB class to - read xyz file #extract xyz file from the xxx_INP4GEN.rrm file
- read INPUT for -- reading the spin/charge values #needed to create *.xcontrol file from GRRM18 xxx.com file -- reading the task E, EG, or EGH (Energy, gradient, and hessian) #to perform by reading the *_INP4GEN.rrm file generated by GRRM17 - create *.xcontrol file from xyz and INPUT (basically *xyz is read automatically ..confirm it??) - finally read energy, gradient, and/or hessian from xtb output

get_xtb_xcontrol()

get xt.xcontrol file by reading the - charge and multiplicity - other contraints from xyz object

Note: to get no of un-paired electrons (Ue) from multiplicity (M)=2S+1 Ue = 0 (2*S) for M=1, S=0 (no unpaired elctrons) Ue = 1 (2*S) for M=2, S=½ (one unpaired elctrons) Ue = 2 (2*S) for M=3, S=1 (two unpaired elctrons) ===> Ue = M-1

the fixed atoms are provided from the external xyz-object aka aadhaar object and atoms positions/symbols also. the charge and spin are Hard coded: charge = 0 , and unpaired electon (xtb need Ue not spin) = 0

Note
xt.xcontrol example:
$chrg 0
$spin 0
$fix
atoms: 15, 16, 17, 18, 19, 20, 21, 22, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
atoms: 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
$end

get_task()

TASK: ENERGY, GRADIENT, and HESSIAN GUESS: READ FROM test_MO2GEN.rrm NACTIVEATOM / NATOM: 3 / 3 NFROZENATOM: 0

more to implement such as hookian potential to fix the atoms during the reaction etc..!!

execute_xtb_xx(xcontrol_file_prefix, coord_file_prefix, task)

execute xtb program package given following inputs

Parameters:

  • xcontrol_file_prefix
  • coord_file_prefix
  • task

Returns:

  • generate output files from the xtb excution

ext_interface_xx(xyz_obj, xyz_filename=None)

interface to external program package for performing bfgs relaxation etc calculations

INPUT is name of input file containing charge, spin-multiplicity, and taks (E,EG, and EGH)

Interface to external code, here xtb, to carry out 4 things:

  1. create input file for the external code (here xtb code); the input file entries varies depending on the request from GRRM.out file indicated in xxx_INP4GEN.rrm

  2. excecute the xtb code

execution_manager(opt_dirname, xyz_filename, fix_atmlist=None)

manage execution of xtb code and related files