Giter VIP home page Giter VIP logo

ferminet_with_ecp's Introduction

Fermionic Neural Network with Effective Core Potential

An implementation combining FermiNet with effective core potential (ecp). For paper, see https://arxiv.org/abs/2108.11661.

This repository directly depends on FermiNet (Many thanks to this awesome software and the team behind it!). Certain files are modified from the corresponding ones in FermiNet, and we added comments prefixed with "MODIFICATION FROM FERMINET" on the introduced changes.

Installation

pip install -e . will install all required dependencies.

Usage

Workflow of ferminet_ecp is similar to the original FermiNet, which uses the ConfigDict from ml_collections to configure the system. A few example scripts are included under ferminet_ecp/configs/ecp.

ferminet_ecp --config ferminet_ecp/configs/ecp/X.py:Ga,1 --config.batch_size 256 --config.pretrain.iterations 100

To use ECP for atoms, define ECP-related fields in the corresponding config file. For instance,

from pyscf import gto
from ferminet_ecp import base_config

def get_config(input_str):
    symbol, spin = input_str.split(',')
    cfg = base_config.default()
    mol = gto.Mole()
    # Set up molecule
    mol.build(
        atom=f'{symbol} 0 0 0',
        basis={symbol: 'ccecpccpvdz'},
        ecp={symbol: 'ccecp'},
        spin=int(spin))

    cfg.system.pyscf_mol = mol
    return cfg

Moreover, we want to mention that we remove local energy outlier in training phase via config.optim.rm_outlier flag, which violates variational principle and needs to be turned off in inference phase.

Our experiments were carried out with jax==0.2.12 and jaxlib==0.1.65+cuda102. We hit some cuda issues with cuda 11, especially when training with KFAC.

Giving Credit

If you use this code in your work, please cite the associated paper.

@misc{li2021fermionic,
      title={Fermionic Neural Network with Effective Core Potential}, 
      author={Xiang Li and Cunwei Fan and Weiluo Ren and Ji Chen},
      year={2021},
      eprint={2108.11661},
      archivePrefix={arXiv},
      primaryClass={physics.chem-ph}
}

ferminet_with_ecp's People

Contributors

giantelephant123 avatar

Watchers

James Cloos 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.