Giter Site home page Giter Site logo

hartreefock's Introduction

HartreeFock

Very basic Hartree Fock implementation built to get a feeling for what happens under the hood. I wrote this in part as a way to get my hands dirty with coding Hartree Fock from a computational/theoretical perspective, but also a way to learn Python. The code may therefore not be efficient or occassionally overloaded, just as a way for me to practice certain Pythonic methods.

I tried to write the code to be modular, so if you don't want to write code that parses basis set files to create a workable molecule, then simply import the 'tools.py' file. The same goes for integrals, just import 'integrals.py'. Many people simply prefer focusing on the scf part, in which case all you'll need to do is write your own 'scf.py' file.

To help the process, I've written up a document which gives everything you should need to implement your own Hartree Fock from scratch. The file is aptly named, 'HartreeFockImplementationFromScratch.pdf'.

Prerequisites: The code is written in Python 3, so please make sure you are using Python 3. That said, most of this can be easily changed to fit Python 2.

Installing: Simply 'git pull' the directory and everything should work, there is no installation necessary. All modules used should be readily available. If this is not the case, you may need to 'pip install' certain modules.

General Structure:

'driver.py' -> Initializes the molecule using 'tools.py' and runs the scf procedure using 'scf.py' 'tools.py' -> Parses basis set files and coordinate files to create the molecule that you need in a program readable way 'scf.py' -> The meat of the program which builds all of the matrices (using 'integrals.py') and runs the actual scf routine 'integrals.py' -> Does the heavy lifting for the program, computing all of the intervals, from the simple overlap integrals to the more complicated eris. 'check.py' -> More or less a 'driver.py' file, but includes the ability to check against some test molecules

'test_molecules/' -> Houses the test molecules that give a range of test cases, atoms (Be), s-orbitals only (H2), charged system (HeH+), p-orbital symmetric diatomic (N2), asymmetric diatomic (CO), tri-atomic (H2O), etc.

PLEASE let me know if I made mistakes anywhere. This whole project is a learning process and I'm sure I've made a number of mistakes along the way. I hope that it helps other interested students and future theoretical/compuational chemists and physicists get a better feel for what is means to do ab-initio computation.

Best wishes for your learning! Malte [email protected]

hartreefock's People

Contributors

langemf avatar

Watchers

 avatar

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.