Giter Club home page Giter Club logo

pyscf.github.io's Introduction

Python-based Simulations of Chemistry Framework

Build Status codecov

2024-06-19

Installation

  • Install stable release:

      pip install pyscf
    
  • New features developed in recent years are available in the pyscf-forge package:

      pip install pyscf-forge
    
  • Certain modules are maintained as extensions of PySCF, such as dispersion, dmrgscf, fciqmc, icmpspt, properties, semiempirical, shciscf ... (more on https://github.com/pyscf) can be installed using pip:

      pip install pyscf[all]
    

    An individual extension can be installed:

      pip install pyscf[dispersion]
    
  • More details of custom installation can be found in installation manual

Citing PySCF

Base PySCF

The following paper should be cited in publications utilizing the PySCF program package:

Recent developments in the PySCF program package, Qiming Sun, Xing Zhang, Samragni Banerjee, Peng Bao, Marc Barbry, Nick S. Blunt, Nikolay A. Bogdanov, George H. Booth, Jia Chen, Zhi-Hao Cui, Janus J. Eriksen, Yang Gao, Sheng Guo, Jan Hermann, Matthew R. Hermes, Kevin Koh, Peter Koval, Susi Lehtola, Zhendong Li, Junzi Liu, Narbe Mardirossian, James D. McClain, Mario Motta, Bastien Mussard, Hung Q. Pham, Artem Pulkin, Wirawan Purwanto, Paul J. Robinson, Enrico Ronca, Elvira R. Sayfutyarova, Maximilian Scheurer, Henry F. Schurkus, James E. T. Smith, Chong Sun, Shi-Ning Sun, Shiv Upadhyay, Lucas K. Wagner, Xiao Wang, Alec White, James Daniel Whitfield, Mark J. Williamson, Sebastian Wouters, Jun Yang, Jason M. Yu, Tianyu Zhu, Timothy C. Berkelbach, Sandeep Sharma, Alexander Yu. Sokolov, and Garnet Kin-Lic Chan, J. Chem. Phys., 153, 024109 (2020). doi:10.1063/5.0006074

Density functional calculations

As PySCF does not implement density functionals, instead employing external libraries to handle their evaluation, these libraries should also be cited in publications employing PySCF for density functional calculations.

If your calculation employed Libxc, cite

Recent developments in libxc — A comprehensive library of functionals for density functional theory, Susi Lehtola, Conrad Steigemann, Micael J.T. Oliveira, and Miguel A.L. Marques, SoftwareX 7, 1 (2018). doi:10.1016/j.softx.2017.11.002

If your calculation employed XCFun, cite

Arbitrary-order density functional response theory from automatic differentiation, Ulf Ekström, Lucas Visscher, Radovan Bast, Andreas J. Thorvaldsen, and Kenneth Ruud, J. Chem. Theory Comput. 6, 1971 (2010). doi:10.1021/ct100117s

Bug reports and feature requests

Please submit tickets on the issues page.

pyscf.github.io's People

Contributors

awvwgk avatar dependabot[bot] avatar fishjojo avatar frobnitzem avatar gkc1000 avatar h-larsson avatar hczhai avatar hebrewsnabla avatar jamesetsmith avatar januseriksen avatar jhrmnn avatar kylebystrom avatar marusongmaru avatar matthew-hennefarth avatar ndattani avatar obackhouse avatar pablomazo avatar ppinski-hqs avatar samragni-93 avatar seunghoonlee89 avatar sokolov-group avatar sunchong137 avatar sunqm avatar susilehtola avatar tberkel avatar verena-neufeld avatar xubwa avatar yangcal avatar zhcui avatar zhutianyu1991 avatar

Stargazers

 avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyscf.github.io's Issues

Example 43-AVAS does not finish running

I have been trying the AVAS example, but before being able to do anything about it, there is an issue with a self-consistent calculation. Line:
https://github.com/pyscf/pyscf-doc/blob/93f34be682adf516a692e28787c19f10cbb4b969/examples/mcscf/43-avas.py#L49
is not able to finish execution.
I have tried it both in my personal laptop for larger times than an hour, and in google colab for more than half an hour and it never finishes. I am inclined to think there might be an issue.
(Installation was done in both cases via pip install pyscf)

Max memory syntax wrong

A friend of mine contacted me saying that the instructions at https://pyscf.org/code-rule.html is incorrect since psutil.virtual_memory() returns 11 values, not 10.

Sure enough, running the example code

import psutil
total, available, percent, used, free, active, inactive, buffers, cached, shared = psutil.virtual_memory()

gives me the error

>>> total, available, percent, used, free, active, inactive, buffers, cached, shared = psutil.virtual_memory()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: too many values to unpack (expected 10)

This is with Python 3.9.4.

band structure from HF and hybrids

A perennial question is how to use get_bands with HF. One should either
(i) shift the BZ mesh or
(ii) use exxdiv="vcut_sph" (or "ws?")
This should be documented since this comes up from time to time.

Gallery of examples

We should have a way to expose what is in the examples without people having to read each example. Could be pushed to the website, e.g. like matplotlib gallery of examples.

typo in md example

# Generate the integrator
# sets the time step to 5 a.u. and will run for 100 steps
# or for 50 a.u.
myintegrator = pyscf.md.NVE(myscanner,
dt=5,
steps=10,
data_output="BOMD.md.data",
trajectory_output="BOMD.md.xyz").run()
# Note that we can also just pass the CASSCF object directly to
# generate the integrator and it will automatically convert it to a scanner
# myintegrator = pyscf.md.NVE(mycas, dt=5, steps=100)

Should it be 10 steps in comment?

Cubegen and molden file

Hello everyone.
I am new in PySCF, I have already worked with gaussian and orca..
gaussian generates a log and chk file that we use to visualize the orbitals and energy properties, but with PySCF it's not the same thing, I saw that you have to generate a Cubegen or molden file, I tried but its didn't go well.
possible a hand to understand this procedure?
Thanks.

for loops

Can anyone assist me with writing for loops in pyscf?

R, U, G, complex

We need to document for every method whether it has R, U, G and complex orbital support.

BLAS library for AMD CPU

The current install instruction of linking BLAS library was written for Intel CPU. For AMD CPU (and other CPUs), it would be helpful to add an instruction for the possible choices of BLAS library and their settings in cmake command. See relevant discussions in pyscf/pyscf#980

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

Replace hard-coded examples in the docs with includes

The manual has several examples hard-coded in its source. This is suboptimal, since running the examples then requires copypasting the code to a Python terminal. A better solution would be to replace the hard-coded examples by include statements; that way users can run the examples without copy-paste.

API theme

The current API documentation puts all the functions in the same web page, which seems not clear. It would be better to use the same style as numpy documentation where each page contains only one function.

Errors when on create cubgen and molden files

Hello
I have some errors after run dft calcul on creating cube and molden files
here is the code
from pyscf import gto
from pyscf import dft
from pyscf.tools import cubegen
from pyscf.tools import molden
import os
os.OMP_NUM_THREADS=6

strfile='C6Ge6H6'
strpath= '/home/dev/Documents/New Job 5-5-22/Cation/' + strfile +'/B3lyp/'
strpath_xyz= '/home/dev/Documents/My Jobs/' + strfile + '/'
Mol_C= gto.Mole()

Mol_C.atom ="""H 0.000000000000 0.000000000000 0.000000000000
C 0.000000000000 0.000000000000 1.087900000000
H 1.025681956337 0.000000000000 1.450533333333
H -0.512840978169 0.888266630391 1.450533333333
H -0.512840978169 -0.888266630391 1.450533333333"""

Mol_C.basis = 'def2-qzvp'
Mol_C.verbose = 5
Mol_C.charge = 1
Mol_C.spin = 1
Mol_C.max_memory=12000
Mol_C.output = strpath + strfile + '_B3lyp.log'
Mol_C.build()

mf = dft.UKS(Mol_C)
mf.xc = 'B3LYP'
mf.chkfile = strpath + strfile + '_B3lyp.chk'
mf.run()
energy = mf.kernel(mf.make_rdm1())
cubegen.orbital(Mol_C, strpath + strfile + '_B3lyp_mo1_orb.cube', mf.mo_coeff[:,0])
cubegen.density(Mol_C, strpath + strfile + '_B3lyp_dens.cube', mf.make_rdm1())
cubegen.mep(Mol_C, strpath + strfile + '_B3lyp_pot_mep.cube', mf.make_rdm1())

with open(strpath + strfile + 'mo' + '.molden', 'w') as f1:
molden.header(Mol_C, f1)
molden.orbital_coeff(Mol_C, f1, mf.mo_coeff, ene=mf.mo_energy, occ=mf.mo_occ)

print({strfile: energy})

error for cube
shapes (8000,177) and (2,177) not aligned: 177 (dim 1) != 2 (dim 0)
error for molden
IndexError: index 2 is out of bounds for axis 0 with size 2

can some body helps please?

Authors section in manual

There should be an Authors section in the manual detailing the authorship of the various sections. The pinned post on Slack is a good initial guess.

Brushup of the documentation

Documentation tends to be always the last thing developers pay attention to, and often what happens is that once a feature is complete and merged, one moves onto the next thing so documentation is never kept up to date. (A good way to avoid this is to force people to document their code by not allowing undocumented code to be merged in in the first place!)

A major issue in PySCF is that it is quite distinctively a developer code. Setting up calculations requires programming, and the user has to explicitly take care of things that happen automatically in other codes, such as the removal of linear dependencies. (I actually still look at the examples distributed as part of PySCF to set up my calculations!) This special characteristic means that documentation is hugely important.

In the old documentation, the tutorial(!) had a lot of specialized code and customizations, like

  • a function that printed out the occupations by symmetry in section 5.5.1, Hartree-Fock; this happens automatically in other codes, or
  • a hand-written implementation of unrestricted MP2 in section 5.5.2

While these examples underline the flexibility of PySCF, I'm not sure their proper place is in the tutorial chapter; a much better place would be in the developer documentation. The tutorial section should just consist of straightforward examples for professional quantum chemists, that is, people who already know what they want to do, and just want to see how to run that calculation with PySCF.

Of course, not all bases can be covered in the tutorial, so also the user documentation will have several examples on how to run a bit more complicated calculations with PySCF. As in the manuals for other programs, the user documentation should contain at least a minimal level of theory of what is done in the code and how the equations are solved along with any relevant citations.

Another issue with the current version of the documentation is that molecular and crystalline calculations are discussed together, which makes the documentation extremely hard to follow. The discussion should be started out with molecules - which are easier - and then continue in a new section to crystals, where the differences to molecular calculations can be discussed.

The user documentation should also not go too deep into the code. The code design belongs in the developer documentation section. The developer documentation is the "hard-core" version, with the class structures, coding styles, etc. The section builds on top of the user documentation, so the theory already presented in the user section does not need to be repeated; however, algorithmic details should be discussed at a deeper level in the developer section.

Version of sphinxcontrib-bibtex

For what reason the version of sphinxcontrib-bibtex is fixed to 1.0.0 in requirements.txt ?
I find that 1.0.0 does not work with python 3.10 and when I switch it to 2.4.2, there's no problem for compilation.

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.