Giter Club home page Giter Club logo

equivariant_electron_density's Introduction

equivariant_electron_density

Generate and predict molecular electron densities with Euclidean Neural Networks

Below is a workflow for how to use the scripts in this repository.

Step 1: Generate molecular electron densities from a set of input coordinates.

The only neccesary inputs are a atomic coordinates file and an auxiliary basis set file. You can find examples of both in tests/test_data_generation. Atomic coordinates must be supplied in XYZ file format.

Command: python densityfit_q.py xyz_filename orbital_basis density_fit_basis

Example: python densityfit_q.py water.xyz aug-cc-pvtz def2-universal-jfit-decontract

This command uses the densityfit_q.py script to run a quantum chemistry calculation with the psi4 quantum chemistry program. Then it projects the electron density onto the density fitting basis. This will produce a psi4 output file (from which one can extract energy and forces) and density output file with the coefficients of the density fitting basis set.

Step 2: Create the dataset

We must now parse the output files to create a dataset for training. This is done with the create_dataset.py script.

Command: python create_dataset.py path/to/data/folder dataset_name

Example: python create_dataset.py ../tests/test_data_generation water_density_dataset.pkl

The dataset will now be the input we use to train our e3nn network.

Step 3: Train the model

Now it's time to train an e3nn model on our dataset. We will use the train_density.py script in training to do this. There are a number of keyword arguments to train_density.py.

  • "dataset": path to training dataset
  • "testset": path to test dataset
  • "split": number of samples from the dataset to use for training
  • "epochs": number of epochs for training

Command: python train_density.py --dataset path/to/dataset --testset path/to/testset --split n_samples --epochs n_epochs

Example: python train_density.py --dataset ../tests/water_density_dataset.pkl --testset ../tests/water_density_testset.pkl --split 100 --epochs 500

The script is set up to track training and test metrics in wandb, so you'll need an account to see how training is going.

For additional resources, see the e3nn tutorial. Check out the tutorial on electron densities here

equivariant_electron_density's People

Contributors

ajemyunglee avatar joshrackers avatar pvrao2 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

equivariant_electron_density's Issues

environment

This is an excellent work.
There is a question, Can you provide the necessary environment configuration for this project。

Converting Psi4 (or other QC tools) electron densities to spherical harmonics

I was wondering is there a way whereby the electron densities from Psi4's wave function objects can be fitted to spherical harmonic basis functions and if this could be generalised to other QC methods, DFT, MP2, CCSD(T), etc..., basis sets, and other quantum chemistry tools?
Also, if there's a part of the code that does this, could you kindly point me to it and perhaps give a slight explanation to what is involved in this change of basis?
Thank you.

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.