Code Monkey home page Code Monkey logo

xtb-gaussian's Introduction

An xtb wrapper for Gaussian

This is a wrapper that allows xtb to be used as part of Gaussian. This is useful in particular for TS optimizations that xtb doesn’t otherwise do, and that Gaussian does very well.

As xtb already has most of the functionality built-in, we mostly just leverage that. The only improvement really is the use of some perl scripting to transform xtb Hessians to Gaussian Hessians, which xtb doesn’t do on it’s own. The short script is in xtb-gaussian.

Usage

The files examples/optimize.com and example/QST2.com provide examples of usage (the optimization of a water molecule and finding an SN2 transition state and reaction path using quasi-Newton synchronous transit). In short, the Gaussian input file should have a method line like this one,

%chk=ts
# external="xtb-gaussian -P 12 --etemp 300.0"
  opt=(calcfc,ts,noeigentest,nodownhill,nomicro)

Here, we set the number of threads for xtb to 12 (-P 12 above) and perform a transition state search using an initial xtb Hessian and xtb gradient calculations. Additional arguments to xtb can be passed in the external variable (like --etemp 300.0 above). Passing --log-all as the first argument to xtb-gaussian will mix in the (often very long) xtb output with the Gaussian output, which is not done by default for performance and easier parsing of Gaussian log files.

Note that the molecular charge included in the Gaussian molecule deck is automatically used the wrapper script. However, that is not true of the multiplicity! The script will warn of non-singlet multiplicity, which you can technically treat by passing the appropriate --uhf argument to xtb in the external string (caveat emptor).

Installation

Installation consists solely of putting xtb-gaussian and xtb both on $PATH so that they are visible to Gaussian. The only dependency is Perl. This code was tested against xtb 6.2.3 and xtb 6.3.1rc1 binaries on linux.

Performance

There are some things to keep in mind to ensure the best possible performance, mostly because of Gaussian is a bit old-school.

Firstly, passing %CPU to gaussian makes xtb use 1 thread. So don’t do it! Furthermore, %NProcShared= will make Gaussian wait busily for xtb using a full half of the NProcShared cores while xtb is running, but use all the cores for it’s own routines (like Hessian diagonalization). It is best to give only 1 or 2 processes to Gaussian and the rest to xtb using -P as above if Hessians are often computed (with xtb parallelization) or the system is large. Otherwise, allocating some threads to Gaussian can make the code faster.

Secondly, performance is very IO centric as Gaussian and xtb keep writing and reading files over and over again. The wrapper respects the Gaussian scratch directory. Running with $GAUSS_SCRDIR pointing at a fast filesystem (such as /dev/shm/ on linux) makes a huge difference.

Contributors

I wrote this perl version based on a Python script developed by postdoctoral fellows Kjell Jorner (at AstraZeneca, UK) and Gabriel dos Passos Gomes (University of Toronto, Canada).

xtb-gaussian's People

Contributors

clavigne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xtb-gaussian's Issues

help for ONIOM

Dear aspuru-guzik-group,
I used your xtb-gaussian script to calculate the transition states and it works perfectly. Thanks for the nice work.
Now I would have liked to use it to perform two layers ONIOM calculations (DFT/xtb) but the program crashes.
I attached a zipped file with all files and verbal output to the shell. Gau-378732.rwf has been omitted because too big.
I would be really grateful if you could find a solution to the problem.
Kind regards,
Antonio Rescifina


Prof. Antonio Rescifina
Università di Catania
Dipartimento di Scienze del Farmaco e della Salute
Viale Andrea Doria, 6
95125 – Catania
Italia
Tel.: +39 095 738 50 17
Fax: +39 06 233 208 980
E-mail: [email protected]


ONIOM_files.zip

xtb frequency and gaussian frequency

I have run xtb-gaussian on an open shell molecule with a scale factor set for frozen atoms in gaussian optimization, in the xtb output file there is no imaginary frequency but in gaussian output there are multiple imaginary frequencies. Wondering why the two are not the same?

size limit to Hessian calculations?

hi all,
Is there a perl-enforced size limit to the Hessian calculations? When I run a model that has 338 or greater atoms with calcfc, I get:

failed to open hessian at /home/qcheng1/git/xtb-gaussian/xtb-gaussian line 80.

Stack trace terminated abnormally.

------- xtb command was ---------
?> xtb ./Gau-114034.EIn -P 4 --gbsa h2o --input 1.fix --verbose --hess --charge -1 >/dev/null 2>Gau-114034.EMs >> xtbout

ExternalExternalExternalExternalExternalExternalExternalExternalExternalExternal

Recovered energy= 0.00000000000 dipole= 0.000000000000 0.000000000000 0.000000000000
FIO-F-217/formatted read/unit=31/attempt to read past end of file.
File name = /home/scratch/geward/2746189/Gau-114034.EOu formatted, sequential access record = 1017
In source file runexo.f, at line number 36

running with system with multiplicity!=1

Can xib-gaussian work with system with a spin multiplicity not equal to 1? I have tried on a system and saw "Failed to open output file from external program." in the gaussian output file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.