Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3187b5a
rename python package to librascal
agoscinski Dec 8, 2021
a170d85
structure requirements in three levels minimal < common < dev
agoscinski Dec 8, 2021
0b51e18
author list in doc
agoscinski Dec 8, 2021
755e386
add contributor list, adapt contributor to version and author
agoscinski Dec 8, 2021
a552d1f
rename contributor file
agoscinski Dec 8, 2021
6fd2082
rm file indetifier in README.rst, because it makes it unable to be pa…
agoscinski Dec 8, 2021
d67436d
updating README with new information
agoscinski Dec 8, 2021
e254c85
updating README
agoscinski Dec 8, 2021
281b47e
structure requirements
agoscinski Dec 8, 2021
fa32786
fix bugs in doc
agoscinski Dec 8, 2021
81c85de
fix typos
agoscinski Dec 8, 2021
386af3e
add doc.txt, rename testing.txt -> tests.txt
agoscinski Dec 8, 2021
759e338
pretty
agoscinski Dec 8, 2021
94e1ec7
clean setup.py
agoscinski Dec 8, 2021
67dd14b
update rascal imports in notebooks
agoscinski Dec 8, 2021
6a485c9
fix cleaning
agoscinski Dec 8, 2021
898c4be
add tests package requirements to notebook tests
agoscinski Dec 8, 2021
a210622
update model name in gap model
agoscinski Dec 8, 2021
0620d82
update README
agoscinski Dec 8, 2021
425ce05
update rascal package in performance
agoscinski Dec 8, 2021
7c85962
add version in sphinx back; add classifiers to setup.py; add AUTHORS …
agoscinski Dec 8, 2021
00f666b
embedded suggestions
agoscinski Dec 14, 2021
8572128
Merge branch 'feat/pypi-release' of github.com:cosmo-epfl/librascal i…
agoscinski Dec 14, 2021
b281a89
rm `post10` from __init__; rm deprecate helpers developers ref
agoscinski Dec 14, 2021
7c9b0bf
rst files wrong headers, see https://stackoverflow.com/a/24504437
agoscinski Dec 14, 2021
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
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ default_job: &default_job
- checkout
- run:
name: Install Python dependencies
command: python3.8 -m pip install -r requirements.txt
command: python3.8 -m pip install -r requirements/dev.txt
- run:
name: Configure
command: |
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- checkout
- run:
name: Install Python dependencies
command: python3.8 -m pip install -r requirements.txt
command: python3.8 -m pip install -r requirements/dev.txt
- run:
name: Configure
command: |
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- checkout
- run:
name: Install Python dependencies
command: python3.8 -m pip install -r requirements.txt
command: python3.8 -m pip install -r requirements/dev.txt
- run:
name: Configure
command: |
Expand All @@ -138,7 +138,7 @@ jobs:
- checkout
- run:
name: Install Python dependencies
command: python3.8 -m pip install -r requirements.txt
command: python3.8 -m pip install -r requirements/dev.txt
- run:
name: Configure
command: |
Expand All @@ -160,7 +160,7 @@ jobs:
- run:
name: Install Python dependencies
command: |
python3.8 -m pip install -r requirements.txt
python3.8 -m pip install -r requirements/dev.txt
python3.8 -m pip install codecov coverage
- run:
name: Configure
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
- checkout
- run:
name: Install Python dependencies
command: python3.8 -m pip install -r requirements.txt
command: python3.8 -m pip install -r requirements/common.txt -r requirements/tests.txt
Comment thread
Luthaf marked this conversation as resolved.
Outdated
- run:
name: Configure
command: |
Expand Down
16 changes: 16 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Michele Ceriotti
Félix Musil
Max Veit
Alexander Goscinski
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to sort this file by some alphabetic order? I'm not sure how you generated it =)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had some idea behind it, but it seems a bit random. changed to alphabetic

Guillaume Fraux
Michael J. Willatt
Markus Stricker
Till Junge
Klim Goldshtein
Chiheb B. Mahmoud
Federico Giberti
Andrea Grisafi
Rose K. Cersonsky
Lorenzo Gigli
Jigyasa Nigam
Kevin K. Huguenin-Dumittan
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.rst requirements_pip.txt CMakeLists.txt pyproject.toml
include README.rst AUTHORS.txt requirements/minimal.txt CMakeLists.txt pyproject.toml
recursive-include src *
recursive-include bindings *
recursive-include cmake *
Expand Down
152 changes: 39 additions & 113 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,15 @@ For more information, have a look at the documentation_!
Development
-----------

The code is currently in the alpha development phase; it is not yet
suitable for public use. Nevertheless, there is a significant amount of
functionality (including two tutorials) currently working and available
to test if you’re feeling adventurous. Feedback and bug reports are
welcome, as long as you keep the above in mind.
The code is currently in the beta development phase, therefore we cannot guarantee that the interface and data formats will not change, but it has been in use for at least a year.
Feedback and bug reports are welcome, as long as you keep the above in mind.

.. end-intro

See `Helpers for Developers`_ below for some essential tools if you want to help
develop libRascal. Be sure to also read `CONTRIBUTING.rst <CONTRIBUTING.rst>`_
develop librascal. Be sure to also read `CONTRIBUTING.rst <https://github.com/cosmo-epfl/librascal/blob/master/CONTRIBUTING.rst>`_
if you plan on making a contribution.

Installation
------------

.. start-install

The installation of the library for python use can be done simply with:

.. code:: bash

pip install .

assuming that `python` 3.5 (or higher) and `gcc` or `clang` are available.

Dependencies
~~~~~~~~~~~~

Expand All @@ -77,65 +61,44 @@ following packages installed:
+-------------+--------------------+
| python | 3.6 or higher |
+-------------+--------------------+
| numpy | 1.13 or higher |
+-------------+--------------------+
| scipy | 1.4.0 or higher |
+-------------+--------------------+
| ASE | 3.18 or higher |
+-------------+--------------------+

Other necessary packages (such as Eigen and PyBind11) are downloaded
automatically when compiling Rascal.
Other necessary packages Eigen, PyBind11 and wigxjpf are downloaded
automatically when compiling librascal.


The following packages are required for some optional features:
Installation
------------

.. start-install

When the dependencies are met, the python package can be installed with:

.. code:: bash

pip install librascal

For optional features of librascal the following python packages are required:

+--------------------------+-------------+--------------------+
| Feature | Package | Required version |
| Librascal feature | Package | Required version |
+==========================+=============+====================+
| Feature compression | skcosmo | 0.1.0 or later |
+--------------------------+-------------+--------------------+
| Rotational algebra | sympy | 1.4 or later |
| (Clebsch-Gordan coeffs.) | | |
+--------------------------+-------------+--------------------+
| Building documentation | pandoc | (latest) |
+--------------------------+-------------+--------------------+
| | sphinx | 2.1.2 or later |
+--------------------------+-------------+--------------------+
| | breathe | 4.14.1 or later |
+--------------------------+-------------+--------------------+
| | nbsphinx | 0.8.1 or later |
+--------------------------+-------------+--------------------+

Compiling
~~~~~~~~~

To compile the code it is necessary to have CMake 3.0 and a C++ compiler
supporting C++14. During the configuration, it will automatically try to
download the external libraries on which it depends:

- Eigen
- Pybind11
- Boost (only the unit test framework library)
- Python3

And the following libraries to build the documentation:

- Doxygen
- Sphinx
- Breathe

Beware, Python3 is mandatory. The code won’t work with a Python version
older than 3.

You can then use pip to install all python packages required for the usage
and development of rascal:
The dependencies for the optional features and the `introductive examples <https://cosmo-epfl.github.io/librascal/examples/examples.html>`_ can be installed with

.. code:: bash

pip install -r requirements.txt
pip install -r requirements/common.txt

Compiling
~~~~~~~~~

To configure and compile the code with the default options, on \*nix
systems (Windows is not supported):
To compile the code it is necessary to have CMake 3.0 and a C++ compiler
Comment thread
Luthaf marked this conversation as resolved.
Outdated
supporting C++14. To configure and compile the code with the default options, on \*nix systems (Windows is not supported):

.. code:: shell

Expand Down Expand Up @@ -176,7 +139,7 @@ for formatting compliance with clang-format 8.0 or higher and black packages
.. code:: shell

sudo apt-get install clang-format-8
pip3 install black
pip install -r requirements/testing.txt

Build Type
^^^^^^^^^^
Expand Down Expand Up @@ -209,7 +172,7 @@ packages. To install them on ubuntu:

.. code:: shell

pip3 install sphinx sphinx_rtd_theme breathe nbsphinx
pip install -r requirements/doc.txt
sudo apt-get install pandoc doxygen graphviz

Then to build the documentation run:
Expand All @@ -220,7 +183,7 @@ Then to build the documentation run:
cmake -DBUILD_DOC=ON ..
make doc

and open :file:`build/docs/html/index.html` in a browser.
and open `build/docs/html/index.html` in a browser.

Bindings
^^^^^^^^
Expand All @@ -235,28 +198,24 @@ build only the c++ library:
cmake -DBUILD_BINDINGS=OFF ..
make

Installing rascal
^^^^^^^^^^^^^^^^^
To install the python library with c++ bindings:
Helpers for Developers
Comment thread
Luthaf marked this conversation as resolved.
Outdated
~~~~~~~~~~~~~~~~~~~~~~

.. code:: shell
All python packages used for development can be installed with:

pip install .
.. code:: shell


Helpers for Developers
~~~~~~~~~~~~~~~~~~~~~~
pip install -r requirements/dev.txt

Deepclean
^^^^^^^^^

To remove all the cmake files/folders except for the external
library (enable glob and remove):
libraries (e.g. Eigen):

.. code:: shell

shopt -s extglob
rm -fr -- !(external|third-party)
make deepclean

Automatic code formatting
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -272,7 +231,7 @@ tools with:

.. code:: shell

sudo apt-get install clang-format
sudo apt-get install clang-format-8
pip install black

The automatic formatting of the c++ and python files can be
Expand Down Expand Up @@ -336,41 +295,8 @@ noise.)

Nonetheless, it is highly discouraged to contribute code in the form of
notebooks; even with filters like ``nbstripout`` they're a hassle to use
in version control. Use them only for tutorials or *stable* examples that
in version control. Use them only for comprehensive tutorials or *stable* examples that
are either meant to be run *interactively* or are meant to be processed by
`sphinx` (`nbsphinx <https://nbsphinx.readthedocs.io/en/latest/>`_) for
inclusion in the
`tutorials page <https://cosmo-epfl.github.io/librascal/tutorials/tutorials.html>`_.

Miscellaneous Information
-------------------------

- Common cmake flags:

- -DCMAKE_CXX_COMPILER
- -DCMAKE_C_COMPILER
- -DCMAKE_BUILD_TYPE
- -DBUILD_BINDINGS
- -DINSTALL_PATH
- -DBUILD_DOC
- -DBUILD_TESTS

- Special flags:

- -DBUILD_BINDINGS:

- ON (default) -> build python binding
- OFF -> does not build python binding

- -DINSTALL_PATH:

- empty (default) -> does not install in a custom folder
- custom string -> root path for the installation


To build librascal as a docker environment:

.. code:: shell

sudo docker build -t test -f ./docker/install_env.dockerfile .
sudo docker run -it -v /path/to/repo/:/home/user/ test
`introductive examples <https://cosmo-epfl.github.io/librascal/examples/examples.html>`_.
10 changes: 5 additions & 5 deletions bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,22 @@ set_target_properties(_rascal PROPERTIES INSTALL_RPATH "${BINDNIGS_INSTALL_RPATH

# Normal installation procedure
# copy rascal folder in the python distribution
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/rascal" DESTINATION "${CMAKE_INSTALL_PREFIX}/bindings"
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/librascal" DESTINATION "${CMAKE_INSTALL_PREFIX}/bindings"
PATTERN "*__pycache__" EXCLUDE
PATTERN "*.pyc" EXCLUDE
PATTERN "*.so" EXCLUDE
PATTERN "*.dylib" EXCLUDE
)
install(TARGETS _rascal DESTINATION "${CMAKE_INSTALL_PREFIX}/bindings/rascal/lib")
install(TARGETS _rascal DESTINATION "${CMAKE_INSTALL_PREFIX}/bindings/librascal/lib")

# Copy the python wrappers in the build folder
# Copy the resulting bindings lib in the python wrapper lib folder
add_custom_target(copy_python_bindings ALL
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/rascal
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/librascal
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/rascal ${CMAKE_BINARY_DIR}/rascal
${CMAKE_CURRENT_SOURCE_DIR}/librascal ${CMAKE_BINARY_DIR}/librascal
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/_rascal.* ${CMAKE_BINARY_DIR}/rascal/lib/
${CMAKE_CURRENT_BINARY_DIR}/_rascal.* ${CMAKE_BINARY_DIR}/librascal/lib/
Comment thread
Luthaf marked this conversation as resolved.
DEPENDS _rascal
COMMENT "Copying python bindings and libraries"
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__all__ = ["lib", "representations", "utils", "neighbourlist"]

__version__ = "0.0.0"
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Kernel(BaseIO):
sparse kernels [1]_, we refer to the pseudo points with 'M'. So a
kernel between the training samples and the pseudo points is
'KNM'. For more information on sparse kernels see
:meth:`rascal.models.krr.train_gap_model`.
:meth:`librascal.models.krr.train_gap_model`.

.. [1] Joaquin Quiñonero-Candela, Carl Edward Rasmussen;
A Unifying View of Sparse Approximate Gaussian Process Regression,
Expand Down
Loading