Giter Club home page Giter Club logo

deepdft's Introduction

DeepDFT Model Implementation

This is the official Implementation of the DeepDFT model for charge density prediction.

Setup

Create and activate a virtual environment and install the requirements:

$ pip install -r requirements.txt

Data

Training data is expected to be a tar file containing .cube (Gaussian) or .CHGCAR (VASP) density files. For best performance the tar files should not be compressed, but the individual files inside the tar can use zlib compression (add .zz extension) or lz4 compression (add .lz4 extension). The data can be split up in several tar files. In that case create a text (.txt) file in the same directory as the tar files. The text file must contain the file names of the tar files, one on each line. Then the text file can then be used as a dataset.

Training the model

Inspect runner.py arguments:

$ python runner.py --help

Example used for training the model on QM9:

$ python runner.py --dataset datadir/qm9vasp.txt --split_file datadir/splits.json --ignore_pbc --cutoff 4 --num_interactions 6 --max_steps 100000000 --node_size 128

The json file contains two keys "train", and "validation" each with a list of indices for the train and validation sets. If the argument is omitted the data will be randomly split.

Running the model on new data

To use a trained model to predict the electron density around a new structure use the script predict_with_model.py. The first argument is the output directory of the runner script in which the trained model is saved. The second argument is an ASE compatible xyz file with atom coordinates for the structure to be predicted.

For example:

$ python predict_with_model.py qm9_pretrained_model example_molecule.xyz

For more options see the predict_with_model.py optional arguments:

$ python predict_with_model.py --help

deepdft's People

Contributors

peterbjorgensen avatar emsunshine 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.