Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change installation #320

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ jobs:
if: always()

- name: tangelo install
# Note: the NO_PYSCF install is temporary we will soon make it an optional dependency
env:
NO_PYSCF: 1
run: |
python -m pip install .
if: always()
Expand All @@ -73,9 +70,6 @@ jobs:
if: always()

- name: Install pyscf
# Note: the NO_PYSCF install is temporary we will soon make it an optional dependency
env:
NO_PYSCF: 0
run: |
python -m pip install pyscf
python -m pip install git+https://github.com/pyscf/semiempirical
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/run_psi4_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ name: psi4 test

on: [pull_request]

env:
NO_PYSCF: 1

jobs:
build:

runs-on: ubuntu-latest
runs-on: windows-latest
ValentinS4t1qbit marked this conversation as resolved.
Show resolved Hide resolved
strategy:
matrix:
python-version: [3.8]
Expand All @@ -29,42 +26,36 @@ jobs:
- name: Install psi4
shell: bash -el {0}
run: |
conda create -n p4env psi4 -c psi4
conda install psi4 python=3.8 -c conda-forge/label/libint_dev -c conda-forge
JamesB-1qbit marked this conversation as resolved.
Show resolved Hide resolved
conda init
conda activate p4env
if: always()

- name: Install pip, wheel, pytest, jupyter
run: |
conda activate p4env
python -m pip install --upgrade pip
pip install wheel
pip install pytest
pip install pytest-cov

- name: Install qulacs
run: |
conda activate p4env
pip install qulacs
if: always()

- name: tangelo install
run: |
conda activate p4env
python -m pip install .
if: always()

- name: tangelo psi4 integral tests
run: |
cd tangelo/toolboxes/molecular_computation/tests
conda activate p4env
pytest --doctest-modules --junitxml=junit/psi4-test-results.xml test_psi4.py
if: always()

- name: tangelo psi4 classical tests
run: |
cd tangelo/algorithms/classical/tests
conda activate p4env
pytest --doctest-modules --junitxml=junit/psi4-classical-test-results.xml
if: always()

Expand Down
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,20 @@ Depending on your OS and environment, some of these packages may be more challen
or any issue regarding the above packages, please check their respective documentation.


Having trouble with PySCF?
Quantum Chemistry Packages
JamesB-1qbit marked this conversation as resolved.
Show resolved Hide resolved
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
JamesB-1qbit marked this conversation as resolved.
Show resolved Hide resolved

Tangelo can be used without having a quantum chemistry package installed but many algorithms, by default, depend on one being installed.
ValentinS4t1qbit marked this conversation as resolved.
Show resolved Hide resolved

Although PySCF is installed by default, this behaviour can be turned off by defining the environment variable `NO_PYSCF=1` and then
installing using pip by `pip install git+https://github.com/goodchemistryco/Tangelo.git@main` or using the "From source, using setuptools"
method.
The two quantum chemistry packages that are natively supported are `PySCF <https://pyscf.org/>`_ and `Psi4 <https://psicode.org/>`_.

The classical solvers `CCSDSolver`, `MP2Solver`, `FCISolver` and `MINDO3Solver` as well as `DMETProblemDecomposition` require
PySCF at this time.
`DMETProblemDecomposition` is only supported with `PySCF`.
JamesB-1qbit marked this conversation as resolved.
Show resolved Hide resolved
`SemiEmpircalSolver` requires PySCF along with 'python3 -m pip install git+https://github.com/pyscf/semiempirical'.
JamesB-1qbit marked this conversation as resolved.
Show resolved Hide resolved

Psi4 is supported everywhere except `CCSDSolver`, `MP2Solver`, `FCISolver` and `MINDO3Solver` and `DMETProblemDecomposition`.
You are also welcome to provide your own interface to a quantum chemistry package of your choice by defining a subclass of
ValentinS4t1qbit marked this conversation as resolved.
Show resolved Hide resolved
`IntegralSolver <https://github.com/goodchemistryco/Tangelo/blob/develop/tangelo/toolboxes/molecular_computation/integral_solver.py>`_ which
provides data about the system (e.g. # electrons, # nuclei, etc) and the one- and two-body integrals when given a molecular geometry, charge, sping
basis set etc.


Quick note for Windows users
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])


with open("tangelo/_version.py") as f:
version = f.readlines()[-1].split()[-1].strip("\"'")

with open('README.rst', 'r') as f:
long_description = f.read()

install('wheel')
if os.environ.get("NO_PYSCF", "0") == "0":
install('pyscf')
install('git+https://github.com/pyscf/semiempirical')

description = "Maintained by Good Chemistry Company, focusing on the development of end-to-end materials simulation workflows on quantum computers."

Expand All @@ -26,7 +24,7 @@ def install(package):
version=version,
description=description,
long_description=description,
#long_description_content_type=description,
# long_description_content_type=description,
url="https://github.com/goodchemistryco/Tangelo",
packages=setuptools.find_packages(),
test_suite="tangelo",
Expand Down