Skip to content

Commit

Permalink
Merge pull request #6 from ajz34/legacy
Browse files Browse the repository at this point in the history
Legacy pyxdh update
  • Loading branch information
ajz34 committed Feb 23, 2024
2 parents 0fc8b8c + f340711 commit a5a956a
Show file tree
Hide file tree
Showing 19 changed files with 118 additions and 1,062 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pypadeploy.yml
@@ -0,0 +1,25 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,6 +10,9 @@ release
*.chk
*.bak
*.sav
.idea/
*.iml
*.xml

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,3 +0,0 @@
[submodule "docs/source/MathJax"]
path = docs/source/_static/Mathjax
url = https://github.com/mathjax/MathJax.git
24 changes: 0 additions & 24 deletions .idea/Py_xDH.iml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

932 changes: 0 additions & 932 deletions .idea/workspace.xml

This file was deleted.

12 changes: 6 additions & 6 deletions .readthedocs.yml → .readthedocs.yaml
Expand Up @@ -2,17 +2,17 @@ version: 2

sphinx:
configuration: docs/source/conf.py

submodules:
include: all
builder: html

build:
image: latest
os: ubuntu-22.04
tools:
python: "3.12"
apt_packages:
- pandoc

python:
version: 3.7
install:
- requirements: docs/requirements.yml
system_packages: true

formats: [htmlzip]
27 changes: 7 additions & 20 deletions Dockerfile
@@ -1,10 +1,10 @@
# https://hub.docker.com/r/jupyter/base-notebook/dockerfile

FROM python:3.7-slim
FROM python:3.8-slim

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -yq dist-upgrade && \
apt-get install -yq --no-install-recommends git && \
apt-get install -yq --no-install-recommends git gcc && \
rm -rf /var/lib/apt/lists/*

ENV WRK_DIR "/work"
Expand All @@ -13,28 +13,15 @@ ENV PKG_DIR="$WRK_DIR/pyxdh"
RUN mkdir $WRK_DIR
WORKDIR $WRK_DIR

RUN mkdir -p $PKG_DIR && \
git clone https://github.com/ajz34/Py_xDH.git $PKG_DIR && \
cp $PKG_DIR/.pyscf_conf.py ~/.pyscf_conf.py
RUN mkdir -p $PKG_DIR
RUN git clone https://github.com/ajz34/Py_xDH.git $PKG_DIR
# RUN cd $PKG_DIR/ && git checkout --force origin/legacy
RUN cp $PKG_DIR/.pyscf_conf.py ~/.pyscf_conf.py

RUN pip --no-cache-dir install -r $PKG_DIR/requirements.txt
RUN pip --no-cache-dir install -r $PKG_DIR/docs/requirements.yml
RUN pip --no-cache-dir install jupyter_contrib_nbextensions
RUN jupyter contrib nbextension install
RUN for extension in \
nbextensions_configurator/config_menu/main \
hide_input/main \
scratchpad/main \
collapsible_headings/main \
toc2/main \
nbextensions_configurator/tree_tab/main \
codefolding/edit \
jupyter-js-widgets/extension; \
do jupyter nbextension enable $extension --sys-prefix; done
RUN mkdir -p ~/.jupyter/custom && \
echo ".container { width:85%; }" > ~/.jupyter/custom/custom.css

ENV PYTHONPATH $PKG_DIR:$PYTHONPATH
ENV OMP_NUM_THREADS=4

EXPOSE 8888

Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

32 changes: 20 additions & 12 deletions README.md
@@ -1,8 +1,8 @@
# Python xDH Project

**This project is under going code refactorization. Document code is currently not updated. Unrestricted and RI implementation is on-going.**
**This project is under going code refactorization. Document code is currently not updated. Unrestricted and RI implementation is on-going. Also refers to unfinished [dh project](https://github.com/ajz34/pyscf-forge/tree/pre-0.2).**

**程序正在进行重构。其所对应的文档目前还没有更新。开窍层与 RI 实现目前还有待完善。**
**程序正在进行重构。其所对应的文档目前还没有更新。开壳层与 RI 实现目前还有待完善。同时参见尚未完成的 [dh 项目](https://github.com/ajz34/pyscf-forge/tree/pre-0.2)**

| | Badges |
| :------ | :------- |
Expand Down Expand Up @@ -39,7 +39,7 @@ basis processing, DFT grid engine and CP-HF algorithm is based on python quantum
## Version Information

Current version of pyxdh is 0.0.4. This version should work with pyscf==1.7.1.
Current version of pyxdh is 0.0.7. This version should work with pyscf==1.7.5.

Previous version 0.0.3 should work with pyscf==1.6.4.

Expand Down Expand Up @@ -133,10 +133,6 @@ print(- polar_xDH.E_2)

## Documentation

**Note: Documentation remains to be updated! Only `pyxdh` code can be used currently.**

**注意:文档部分仍有待完善!目前为止,`pyxdh` 库的代码确实是可以使用的,但一些文档的代码是有问题的。**

Published web page: https://py-xdh.readthedocs.io/zh_CN/latest/

Prerequisite knowledge of chapter 3, 4, 10 of *A New Dimension to Quantum Chemistry: Analytic Derivative Methods in
Expand Down Expand Up @@ -169,10 +165,19 @@ package in terminal successfully.

## `pyxdh` Package

This is merely a demo package that implements derivative of some basic quantum chemistry methods.
Currently it is not distrubuted to PyPI.
This is merely a demo package that implements derivative of some basic quantum chemistry methods. Not for real-world problem computation, and not efficient at all.

这个库目前只是一个短小的、包含基础量化方法梯度实现的库。它不适合用于实际生产环境的计算;它的效率及其糟糕。

### Installation

Currently, PyPI installation is available. Python version 3.8 should work.

这个库目前只是一个短小的、包含基础量化方法梯度实现的库。它并没有发布到 PyPI 中。
```bash
pip install pyxdh
```

See also [docker image](#Docker-Image).

### Deficiencies and facilities

Expand Down Expand Up @@ -267,6 +272,9 @@ Simply follow the instructions from terminal should work.
- Thanks labmates for valuable discussions and suggestions.
- Thanks supervisor and teachers in lab for project support and server support.
- Thanks parents for project support.
- Currently, the author does not know any funding grants supporting this project. It should have some.
Project is almost personally driven at this stage.
- Futher discussion is welcomed by raising issue or e-mail. Chinese is prefered; English is also okay.
- Funding information: National Natural Science Foundation of China (Grant 21688102), the Science Challenge Project (Grant TZ2018004), and the National Key Research and Development Program of China (Grant 2018YFA0208600).

This project is not going to be formally published, as it is more like documentation demo instead of program. This project is closely related to the following article:
> Gu, Y.; Zhu, Z.; Xu, X. Second-Order Analytic Derivatives for XYG3 Type of Doubly Hybrid Density Functionals: Theory, Implementation, and Application to Harmonic and Anharmonic Vibrational Frequency Calculations. J. Chem. Theory Comput. 2021, 17 (8), 4860–4871. https://doi.org/10.1021/acs.jctc.1c00457.
4 changes: 2 additions & 2 deletions docs/requirements.yml
@@ -1,9 +1,9 @@
numpy!=1.16
numpy
scipy
jupyter
matplotlib
sphinx
nbsphinx
nbconvert!=5.4
nbconvert
sphinx_rtd_theme
sphinxcontrib-bibtex
1 change: 0 additions & 1 deletion docs/source/_static/Mathjax
Submodule Mathjax deleted from 72aba4
4 changes: 2 additions & 2 deletions docs/source/conf.py
Expand Up @@ -171,7 +171,7 @@

nbsphinx_allow_errors = True
nbsphinx_timeout = 720
mathjax_path = "Mathjax/es5/tex-chtml-full.js"
mathjax_path = "https://lf26-cdn-tos.bytecdntp.com/cdn/mathjax/3.2.0/es5/tex-chtml-full.js"

bibtex_bibfiles = [
"qcbasic/basic_gga.bib",
Expand All @@ -180,5 +180,5 @@
"qcbasic/basic_rhf.bib",
"qcbasic/basic_b2plyp.bib",
"qcbasic/basic_xyg3.bib",
"ref.bib",
# "ref.bib",
]
48 changes: 48 additions & 0 deletions pyproject.toml
@@ -0,0 +1,48 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "pyxdh"
version = "v0.0.7"
authors = [
{name = "ajz34", email = "ajz34@outlook.com"},
]
description = "Document and code of python and PySCF approach XYG3 type of density functional realization"
readme = "README.md"
requires-python = ">=3.8, <3.9"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
]
dependencies = [
"pyscf==1.7.5",
"h5py==3.0",
"scipy==1.4.1",
"numpy==1.18",
"opt_einsum",
"jupyter",
"sphinx",
"nbsphinx",
"pyberny",
"sphinx_rtd_theme",
"sphinxcontrib-bibtex",
"jupyter_contrib_nbextensions",
"pandoc",
"matplotlib",
"docopt",
"codecov",
"pytest-cov",
]

[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
"pyxdh.Validation.numerical_deriv" = ["*.dat"]
"pyxdh.Validation.gaussian" = ["*.fchk"]

[project.urls]
Homepage = "https://github.com/ajz34/Py_xDH"
Documentation = "https://py-xdh.rtfd.io"
8 changes: 5 additions & 3 deletions requirements.txt
@@ -1,7 +1,8 @@
pyscf>=1.7.1
numpy!=1.16
pyscf==1.7.5
h5py==3.0
scipy==1.4.1
numpy==1.18
opt_einsum
scipy
jupyter
sphinx
nbsphinx
Expand All @@ -10,6 +11,7 @@ sphinx_rtd_theme
sphinxcontrib-bibtex
jupyter_contrib_nbextensions
pandoc
matplotlib
docopt
codecov
pytest-cov
27 changes: 0 additions & 27 deletions setup.py

This file was deleted.

0 comments on commit a5a956a

Please sign in to comment.