Skip to content

PySCF

A variety of electronic structure methods are implemented by PySCF. The module makes variants with Python 3.9 and 3.10 available.

Software Version
mokit 1.2.6
numpy 1.25.2
pandas 2.2.2
scipy 1.13.1
spyder 5.5.6
pyscf 2.6.2

Usage example

The default variant uses python 3.9. If this is sufficient the following command executed in the terminal is enough to load the bundle:

module load pyscf

The following example loads the variant with python 3.10

module load pyscf python=3.10

The Spyder IDE, Python and IPython can be run as shown as below:

1
2
3
spyder
ipython
python

The pyscf_shell command can be used to access a shell in the bundle.

pyscf_shell

Cloning the PySCF environment

If additional packages are required then the PySCF environment can be cloned to your home. Run the pyscf_shell command and then run the following commands in the new shell:

1
2
3
conda create --name pyscf++ --clone pyscf
conda activate pyscf++
conda install -q -c conda-forge pyarrow

The name pyscf++ can be changed to your needs and pyarrow can be adjusted to your needs. The new environment can be accessed as follows:

ERN_OVERRIDE_CONDA_ENV="pyscf++" ipython

Finally, creating the clone can be scripted using a HERE-DOC in Bash

1
2
3
4
5
6
pyscf_shell <<SCRIPT
. /ern/bin/activate
conda create --name pyscf++ --clone pyscf
conda activate pyscf++
conda install -q -c conda-forge pyarrow
SCRIPT

The environment can be removed as shown below:

1
2
3
4
pyscf_shell <<SCRIPT
. /ern/bin/activate
conda-env remove -n pyscf++
SCRIPT

Performance notes

No performance notes available

No recommended resources available

Benchmarks

No benchmarks available.

Community guides and tutorials

  • No community guides available.

Official site and documentation

Licensing information

Primary citation

External guides and resources

  • If you know of a guide/tutorial that you have found useful, please help us share it by contacting the HPC staff at hpc@ufs.ac.za