Metadata-Version: 2.4
Name: horton-part
Version: 1.1.8
Summary: Molecular partitioning schemes used in computational chemistry
Author-email: YingXing Cheng <yxcheng2buaa@gmail.com>
Maintainer-email: YingXing Cheng <yxcheng2buaa@gmail.com>
License:                    GNU LESSER GENERAL PUBLIC LICENSE
                               Version 3, 29 June 2007
        
         Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
         Everyone is permitted to copy and distribute verbatim copies
         of this license document, but changing it is not allowed.
        
        
          This version of the GNU Lesser General Public License incorporates
        the terms and conditions of version 3 of the GNU General Public
        License, supplemented by the additional permissions listed below.
        
          0. Additional Definitions.
        
          As used herein, "this License" refers to version 3 of the GNU Lesser
        General Public License, and the "GNU GPL" refers to version 3 of the GNU
        General Public License.
        
          "The Library" refers to a covered work governed by this License,
        other than an Application or a Combined Work as defined below.
        
          An "Application" is any work that makes use of an interface provided
        by the Library, but which is not otherwise based on the Library.
        Defining a subclass of a class defined by the Library is deemed a mode
        of using an interface provided by the Library.
        
          A "Combined Work" is a work produced by combining or linking an
        Application with the Library.  The particular version of the Library
        with which the Combined Work was made is also called the "Linked
        Version".
        
          The "Minimal Corresponding Source" for a Combined Work means the
        Corresponding Source for the Combined Work, excluding any source code
        for portions of the Combined Work that, considered in isolation, are
        based on the Application, and not on the Linked Version.
        
          The "Corresponding Application Code" for a Combined Work means the
        object code and/or source code for the Application, including any data
        and utility programs needed for reproducing the Combined Work from the
        Application, but excluding the System Libraries of the Combined Work.
        
          1. Exception to Section 3 of the GNU GPL.
        
          You may convey a covered work under sections 3 and 4 of this License
        without being bound by section 3 of the GNU GPL.
        
          2. Conveying Modified Versions.
        
          If you modify a copy of the Library, and, in your modifications, a
        facility refers to a function or data to be supplied by an Application
        that uses the facility (other than as an argument passed when the
        facility is invoked), then you may convey a copy of the modified
        version:
        
           a) under this License, provided that you make a good faith effort to
           ensure that, in the event an Application does not supply the
           function or data, the facility still operates, and performs
           whatever part of its purpose remains meaningful, or
        
           b) under the GNU GPL, with none of the additional permissions of
           this License applicable to that copy.
        
          3. Object Code Incorporating Material from Library Header Files.
        
          The object code form of an Application may incorporate material from
        a header file that is part of the Library.  You may convey such object
        code under terms of your choice, provided that, if the incorporated
        material is not limited to numerical parameters, data structure
        layouts and accessors, or small macros, inline functions and templates
        (ten or fewer lines in length), you do both of the following:
        
           a) Give prominent notice with each copy of the object code that the
           Library is used in it and that the Library and its use are
           covered by this License.
        
           b) Accompany the object code with a copy of the GNU GPL and this license
           document.
        
          4. Combined Works.
        
          You may convey a Combined Work under terms of your choice that,
        taken together, effectively do not restrict modification of the
        portions of the Library contained in the Combined Work and reverse
        engineering for debugging such modifications, if you also do each of
        the following:
        
           a) Give prominent notice with each copy of the Combined Work that
           the Library is used in it and that the Library and its use are
           covered by this License.
        
           b) Accompany the Combined Work with a copy of the GNU GPL and this license
           document.
        
           c) For a Combined Work that displays copyright notices during
           execution, include the copyright notice for the Library among
           these notices, as well as a reference directing the user to the
           copies of the GNU GPL and this license document.
        
           d) Do one of the following:
        
               0) Convey the Minimal Corresponding Source under the terms of this
               License, and the Corresponding Application Code in a form
               suitable for, and under terms that permit, the user to
               recombine or relink the Application with a modified version of
               the Linked Version to produce a modified Combined Work, in the
               manner specified by section 6 of the GNU GPL for conveying
               Corresponding Source.
        
               1) Use a suitable shared library mechanism for linking with the
               Library.  A suitable mechanism is one that (a) uses at run time
               a copy of the Library already present on the user's computer
               system, and (b) will operate properly with a modified version
               of the Library that is interface-compatible with the Linked
               Version.
        
           e) Provide Installation Information, but only if you would otherwise
           be required to provide such information under section 6 of the
           GNU GPL, and only to the extent that such information is
           necessary to install and execute a modified version of the
           Combined Work produced by recombining or relinking the
           Application with a modified version of the Linked Version. (If
           you use option 4d0, the Installation Information must accompany
           the Minimal Corresponding Source and Corresponding Application
           Code. If you use option 4d1, you must provide the Installation
           Information in the manner specified by section 6 of the GNU GPL
           for conveying Corresponding Source.)
        
          5. Combined Libraries.
        
          You may place library facilities that are a work based on the
        Library side by side in a single library together with other library
        facilities that are not Applications and are not covered by this
        License, and convey such a combined library under terms of your
        choice, if you do both of the following:
        
           a) Accompany the combined library with a copy of the same work based
           on the Library, uncombined with any other library facilities,
           conveyed under the terms of this License.
        
           b) Give prominent notice with the combined library that part of it
           is a work based on the Library, and explaining where to find the
           accompanying uncombined form of the same work.
        
          6. Revised Versions of the GNU Lesser General Public License.
        
          The Free Software Foundation may publish revised and/or new versions
        of the GNU Lesser General Public License from time to time. Such new
        versions will be similar in spirit to the present version, but may
        differ in detail to address new problems or concerns.
        
          Each version is given a distinguishing version number. If the
        Library as you received it specifies that a certain numbered version
        of the GNU Lesser General Public License "or any later version"
        applies to it, you have the option of following the terms and
        conditions either of that published version or of any later version
        published by the Free Software Foundation. If the Library as you
        received it does not specify a version number of the GNU Lesser
        General Public License, you may choose any version of the GNU Lesser
        General Public License ever published by the Free Software Foundation.
        
          If the Library as you received it specifies that a proxy can decide
        whether future versions of the GNU Lesser General Public License shall
        apply, that proxy's public statement of acceptance of any version is
        permanent authorization for you to choose that version for the
        Library.
        
Project-URL: Homepage, https://lisa-partitioning-method.github.io/horton-part/
Project-URL: Repository, https://github.com/LISA-partitioning-method/horton-part
Project-URL: Changelog, https://github.com/LISA-partitioning-method/horton-part/CHANGELOG.md
Keywords: partition schemes,atom-in-moleucle
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Framework :: Matplotlib
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: quadprog>=0.1.13
Requires-Dist: cvxopt>=1.3.1
Requires-Dist: qpsolvers
Requires-Dist: qc-grid>=0.0.9
Requires-Dist: qc-iodata
Requires-Dist: qc-gbasis>=0.1.0
Requires-Dist: importlib_resources
Requires-Dist: pyyaml
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-skip-slow; extra == "tests"
Dynamic: license-file

# HORTON-PART
[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3.10/)
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://docs.python.org/3.11/)
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://docs.python.org/3.12/)
[![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://docs.python.org/3.13/)

<div align="center">
  <img src="./docs/horton_part_logo.svg"  width="300px" />
</div>

[`HORTON-PART`](https://github.com/LISA-partitioning-method/horton-part) is a computational chemistry package that supports different partition schemes.
It is based on the sub-module [`part`](https://github.com/theochem/horton/tree/2.1.1/horton/part) of `HORTON2`, which is written and maintained by Toon Verstraelen (2).
In [`HORTON3`](https://github.com/theochem/horton?tab=readme-ov-file#horton-3-info), all sub-modules have been rewritten using the pure Python programming language to support Python 3+.
See more details on this [website](http://theochem.github.com/horton/).
It should be noted that [`HORTON2`](https://github.com/theochem/horton) also supports Python 3+ now.
The [`part`](https://github.com/theochem/horton/tree/2.1.1/horton/part) module has also been rewritten and is now called the [`denspart`](https://github.com/theochem/denspart) module.
However, the algorithm implemented in [`denspart`](https://github.com/theochem/denspart) only uses one-step optimization, which can be computationally expensive for large systems.
Additionally, [`denspart`](https://github.com/theochem/denspart) only supports the `MBIS` partitioning scheme.
Another [`part`](https://github.com/theochem/denspart_horton2) module has been rewritten in pure Python by Farnaz Heidar-Zadeh (2).
However, the integration grid implemented in this module still uses the old 'grid' from Horton2.
[`HORTON-PART`](https://github.com/yingxingcheng/horton-part) with version `0.0.X` is based on this module.
Starting from version `1.X.X`, [`HORTON-PART`](https://github.com/LISA-partitioning-method/horton-part) only supports the new integration [`qc-grid`](https://github.com/theochem/grid).
The molecular density can be prepared using [`IOData`](https://github.com/theochem/iodata) and [`GBasis`](https://github.com/theochem/gbasis) packages.

This version contains contributions from:
YingXing Cheng (1),
Toon Verstraelen (2),
Pawel Tecmer (3),
Farnaz Heidar-Zadeh (3),
Cristina E. González-Espinoza (3),
Matthew Chan (3),
Taewon D. Kim (3),
Katharina Boguslawski (3),
Stijn Fias (4),
Steven Vandenbrande (2),
Diego Berrocal (3),
and Paul W. Ayers (3).

- (1) Numerical Mathematics for High Performance Computing (NMH), University of Stuttgart, Stuttgart, Germany.
- (2) Center for Molecular Modeling (CMM), Ghent University, Ghent, Belgium.
- (3) The Ayers Group, McMaster University, Hamilton, Ontario, Canada.
- (4) General Chemistry (ALGC), Free University of Brussels, Brussels, Belgium.

The `Horton-Part` source code is hosted on GitHub and is released under the GNU General Public License v3.0.
Please report any issues you encounter while using the `Horton-Part` library on [GitHub Issues](https://github.com/LISA-partitioning-method/horton-part/issues/new).
For further information and inquiries, please contact us at yxcheng2buaa@gmail.com.


## About
[![arXiv: 2405.08455](https://img.shields.io/badge/arXiv-2405.08455-informational)](https://doi.org/10.48550/arXiv.2412.05079)
[![JCP: 10.1063/5.0245287](https://img.shields.io/badge/JCP-10.1063%2F5.0245287-informational)](https://doi.org/10.1063/5.0245287)
[![JCP: 10.1063/5.0076630](https://img.shields.io/badge/JCP-10.1063%2F5.0076630-informational)](https://doi.org/10.1063/5.0076630)


This package implements partitioning schemes described in three papers: [a mathematical perspective](https://doi.org/10.1063/5.0076630), [a numerical perspective](https://doi.org/10.1063/5.0245287) and [Approximations of the Iterative Stockholder Analysis scheme using exponential basis functions](https://doi.org/10.48550/arXiv.2412.05079), including:

- Becke method
- Mulliken method
- Hirshfeld partitioning scheme
- Iterative Hirshfeld (Hirshfeld-I) partitioning scheme
- Iterative stockholder approach (ISA)
- Gaussian iterative stockholder approach (GISA)
- Minimal Basis Iterative Stockholder (MBIS)
- Alternating Linear approximation of the ISA (aLISA) method
- Global version of Linear approximation of the ISA (gLISA) method
- Generalized Minimal Basis Iterative Stockholder (GMBIS)
- Non-linear approximation of the ISA (NLIS) method

## License

![GPLv3 License](https://img.shields.io/badge/license-GPLv3-blue.svg)


`horton-part` is distributed under GPL License version 3 (GPLv3).

## Dependencies

The following dependencies will be necessary for `horton-part` to build properly,

* quadprog>=0.1.11 : https://github.com/quadprog/quadprog
* cvxopt>=1.3.1 : https://github.com/cvxopt/cvxopt
* qc-grid : https://github.com/theochem/grid
* qc-iodata : https://github.com/theochem/iodata
* gbasis : https://github.com/theochem/gbasis


## Installation

To install the latest version of `horton-part`:

```bash
pip install horton-part

```

To install `horton-part` with version `0.0.x`:

```bash
pip install horton-part==0.0.x
```

To install latest `horton-part`:

```bash
git clone http://github.com/yingxingcheng/horton-part
cd horton-part
pip install .
```

To run test, one needs to add tests dependencies for `tests`:

```bash
pip install .[tests]
```

For developers, one could need all dependencies:
```bash
pip install -e .[dev,tests]
```

## Citations

Please use the following citations in any publication using `horton-part` library:

[1] Cheng, Y. and Stamm, B.
**Approximations of the Iterative Stockholder Analysis scheme using exponential basis functions.**
[![arXiv: 2412.05079](https://img.shields.io/badge/arXiv-2412.05079-informational)](https://doi.org/10.48550/arXiv.2412.05079)

[2] Cheng, Y.; Cancès, E.; Ehrlacher, V.; Misquitta, A. J.; Stamm, B.
**Multi-center decomposition of molecular densities: A numerical perspective.**
J. Chem. Phys. 2025, **162**, 074101, [![JCP: 10.1063/5.0245287](https://img.shields.io/badge/JCP-10.1063%2F5.0076630-informational)](https://doi.org/10.1063/5.0245287)

[3] Benda, R.; Cancès, E.; Ehrlacher, V.; Stamm, B.
**Multi-center decomposition of molecular densities: A mathematical perspective.**
J. Chem. Phys. 2022, **156**, 164107. [![JCP: 10.1063/5.0076630](https://img.shields.io/badge/JCP-10.1063%2F5.0076630-informational)](https://doi.org/10.1063/5.0076630)

[4] Chan, M.; Verstraelen, T.; Tehrani, A.; Richer, M.; Yang, X. D.; Kim, T. D.; Vöhringer-Martinez, E.; Heidar-Zadeh, F.; Ayers, P. W.
**The tale of HORTON: Lessons learned in a decade of scientific software development.**
J. Chem. Phys. 2024, **160**, 162501. [![JCP: 10.1063/5.0196638](https://img.shields.io/badge/JCP-10.1063%2F5.0196638-informational)](https://doi.org/10.1063/5.0196638)

[5] Tehrani, A.; Yang, X. D.; Martínez-González, M.; Pujal, L.; Hernández-Esparza, R.; Chan, M.; Vöhringer-Martinez, E.; Verstraelen, T.; Ayers, P. W.; Heidar-Zadeh, F.
**Grid: A Python library for molecular integration, interpolation, differentiation, and more.**
J. Chem. Phys. 2024, **160**, 172503. [![JCP: 10.1063/5.0202240](https://img.shields.io/badge/JCP-10.1063%2F5.0202240-informational)](https://doi.org/10.1063/5.0202240)

[6] Kim, T. D.; Pujal, L.; Richer, M.; van Zyl, M.; Martínez-González, M.; Tehrani, A.; Chuiko, V.; Sánchez-Díaz, G.; Sanchez, W.; Adams, W.; Huang, X.; Kelly, B. D.; Vöhringer-Martinez, E.; Verstraelen, T.; Heidar-Zadeh, F.; Ayers, P. W.
**GBasis: A Python library for evaluating functions, functionals, and integrals expressed with Gaussian basis functions.**
J. Chem. Phys. 2024, **161**, 042503. [![JCP: 10.1063/5.0216776](https://img.shields.io/badge/JCP-10.1063%2F5.0216776-informational)](https://doi.org/10.1063/5.0216776)

[7] Verstraelen, T.; Adams, W.; Pujal, L.; Tehrani, A.; Kelly, B. D.; Macaya, L.; Meng, F.; Richer, M.; Hernández-Esparza, R.; Yang, X. D.; Chan, M.; Kim, T. D.; Cools-Ceuppens, M.; Chuiko, V.; Vöhringer-Martinez, E.; Ayers, P. W.; Heidar-Zadeh, F.
**IOData: A python library for reading, writing, and converting computational chemistry file formats and generating input files.**
J. Comput. Chem. 2021, **42**, 458–464. [![JCC: 10.1002/jcc.26468](https://img.shields.io/badge/JCC-10.1002%2Fjcc.26468-informational)](https://doi.org/10.1002/jcc.26468)
