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

Python API #5

Merged
merged 3 commits into from
Oct 14, 2019
Merged

Python API #5

merged 3 commits into from
Oct 14, 2019

Conversation

awvwgk
Copy link
Member

@awvwgk awvwgk commented Oct 3, 2019

This will bring the xtb Python API on the same level as the dftd4 Python API. Suggestion on what to support are welcome.

  • create a Python module + setup.py for xtb
  • add tests for pytest and enforce it in meson.build
  • add type hinting as necessary using mypy and enforce it in meson.build
    • Python 3.5 compatibility
  • find an alternative to ctypes.util.find_library and numpy.ctypeslib
  • enforce successful pylint and flake8 checks in meson.build
  • allow multiplicity in API (fix Spin in Python API #2)
    • add sanity check for number of electrons and multiplicity (either fix or error on wrong input)
  • separate optimization script from Python module
  • make use of optional arguments on both sides of the API
  • merge PEEQ and GFN0 into one interface (same backend is used anyway)
  • add GBSA solvation for GFN0 via API
  • allow GFN1 interface to return partial charges, dipole moments, bond orders, ...
  • add a wrapper for GBSA
    • make GBSA properties (like Born-radii and SASA) available in Python
    • make GBSA solvation free energy calculations possible

This pull request is breaking API compatibility.

@awvwgk awvwgk self-assigned this Oct 3, 2019
@awvwgk awvwgk added the enhancement New feature or request label Oct 3, 2019
@awvwgk awvwgk force-pushed the python-api branch 4 times, most recently from 3682149 to d01a1d0 Compare October 7, 2019 18:16
@awvwgk
Copy link
Member Author

awvwgk commented Oct 9, 2019

Seems to be ready for review/merge now.
I should figure out dftd4/dftd4#12 first and fix python 3.5 and OSX compatibility. done

- add interface class wrapping the CDLL
- sanity check for ndarrays (type, size)
- rework ASE Calculator to be independent of the ctypes interface
- add unit test for the three Hamiltonians
- add mypy, pytest and pylint to meson.build
- ignore __pycache__ in the working directory
- moved old xtb.py to scripts
- flake8 test in meson.build
- additional test for the library interface
- added GBSA Python API
- GFN1 return now charges, dipole moments and bond orders
- unified interface for molecular and periodic GFN0
- updated setup.py and corresponding README
- allows passing number of unpaired electrons to the API
- fix test with unpaired electrons
- added stress tensor as property to GFN0 Calculator
- updated description for Python package
- added a sanity check for multiplicities and electron number
- adjusted optimization script for new setup
@awvwgk awvwgk merged commit 0287751 into grimme-lab:master Oct 14, 2019
@awvwgk awvwgk deleted the python-api branch October 15, 2019 18:04
hppritcha pushed a commit to hppritcha/xtb that referenced this pull request Jun 6, 2024
- better inline docstrings for classes
- add readthedocs badge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spin in Python API
1 participant