Code Monkey home page Code Monkey logo

dscribe's Introduction

Build status Coverage Status Code style: black

DScribe is a Python package for transforming atomic structures into fixed-size numerical fingerprints. These fingerprints are often called "descriptors" and they can be used in various tasks, including machine learning, visualization, similarity analysis, etc.

Documentation

For more details and tutorials, visit our documentation at: https://singroup.github.io/dscribe/

You can find even more details in the following articles:

Quick Example

import numpy as np
from ase.build import molecule
from dscribe.descriptors import SOAP
from dscribe.descriptors import CoulombMatrix

# Define atomic structures
samples = [molecule("H2O"), molecule("NO2"), molecule("CO2")]

# Setup descriptors
cm_desc = CoulombMatrix(n_atoms_max=3, permutation="sorted_l2")
soap_desc = SOAP(species=["C", "H", "O", "N"], r_cut=5, n_max=8, l_max=6, crossover=True)

# Create descriptors as numpy arrays or sparse arrays
water = samples[0]
coulomb_matrix = cm_desc.create(water)
soap = soap_desc.create(water, centers=[0])

# Easy to use also on multiple systems, can be parallelized across processes
coulomb_matrices = cm_desc.create(samples)
coulomb_matrices = cm_desc.create(samples, n_jobs=3)
oxygen_indices = [np.where(x.get_atomic_numbers() == 8)[0] for x in samples]
oxygen_soap = soap_desc.create(samples, oxygen_indices, n_jobs=3)

# Descriptors also allow calculating derivatives with respect to atomic
# positions
der, des = soap_desc.derivatives(samples, return_descriptor=True)

Currently implemented descriptors

Descriptor Spectrum Derivatives
Coulomb matrix ✔️ ✔️
Sine matrix ✔️ ✔️
Ewald matrix ✔️ ✔️
Atom-centered Symmetry Functions (ACSF) ✔️ ✔️
Smooth Overlap of Atomic Positions (SOAP) ✔️ ✔️
Many-body Tensor Representation (MBTR) ✔️ ✔️
Local Many-body Tensor Representation (LMBTR) ✔️ ✔️
Valle-Oganov descriptor ✔️ ✔️

Installation

In-depth installation instructions can be found in the documentation, but in short:

pip

pip install dscribe

conda

conda install -c conda-forge dscribe

From source

git clone https://github.com/SINGROUP/dscribe.git
cd dscribe
git submodule update --init
pip install .

dscribe's People

Contributors

afonari avatar aki78 avatar anjohan avatar fullmetalfelix avatar hehomm avatar jan-janssen avatar jarnlaak avatar lauri-codes avatar marchunter avatar ritwit avatar scott-leroux avatar sheriftawfikabbas avatar shiimoe avatar yashasvi-ranawat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dscribe's Issues

MBTR k=2 Question

Hi Lauri,

Sorry to bother you again! I have two questions about the MBTR implementation.

  1. Is there a reason that normalize_gaussians=True returns Gaussians which are one at x=mu? I would expect the exact opposite to be true, since a Gaussian normalised to integrate to 1 would usually not have that value at its center.
  2. Does the distance and inverse_distance behave differently on purpose?

Here is some example code with my questions...

from dscribe.descriptors import MBTR
from ase import Atoms

atoms = [Atoms(positions=[[0.0, 0.0, 0.0], [2.0, 0.0, 0.0]], numbers=[1, 1])]

a = {
    "k2": {
        "grid": {"min": 0, "max": 1, "n": 3, "sigma": 0.0001},
        "geometry": {"function": "inverse_distance"},
        "weighting": {"function": "unity", "cutoff": 0.001},
    },
    "normalization": "none",
    "normalize_gaussians": True,
    "flatten": True,
    "sparse": False,
    "species": [1],
}

mbtr = MBTR(
    k2={
        "grid": {"min": 0, "max": 1, "n": 3, "sigma": 0.0001},
        "geometry": {"function": "inverse_distance"},
        "weighting": {"function": "unity", "cutoff": 0.001},
    },
    normalize_gaussians=True,
    species=[1],
    periodic=False,
)

print(mbtr.create(atoms))
# => [[0. 2. 0.]]
# should this not be [0, 1, 0]? There should be only one inverse distance?

mbtr = MBTR(
    k2={
        "grid": {"min": 0, "max": 1, "n": 3, "sigma": 0.0001},
        "geometry": {"function": "inverse_distance"},
        "weighting": {"function": "unity", "cutoff": 0.001},
    },
    normalize_gaussians=False,
    species=[1],
    periodic=False,
)

print(mbtr.create(atoms))
# => [[0.         0.00050133 0.        ]]
# I thought a *normalised* Gaussian would have this value.

mbtr = MBTR(
    k2={
        "grid": {"min": 1, "max": 3, "n": 3, "sigma": 0.0001},
        "geometry": {"function": "distance"},
        "weighting": {"function": "unity", "cutoff": 0.001},
    },
    normalize_gaussians=True,
    species=[1],
    periodic=False,
)

print(mbtr.create(atoms))
# => [[0. 1. 0.]]
# This is as expected.


mbtr = MBTR(
    k2={
        "grid": {"min": 1, "max": 3, "n": 3, "sigma": 0.0001},
        "geometry": {"function": "distance"},
        "weighting": {"function": "unity", "cutoff": 0.001},
    },
    normalize_gaussians=False,
    species=[1],
    periodic=False,
)

print(mbtr.create(atoms))
# => [[0.         0.00025066 0.        ]]
# See above!

This is on the most recent release version, 0.2.9.

Thanks!

API wishlist: convenience function to obtain all derivatives at once

Dear developers,

I very much appreciate your efforts and progress in the development of Cartesian derivatives for the available descriptors!
Here I would like to note that It would be very convenient to have a function that returns all derivatives at once, ideally in some kind of Jacobian matrix.
Taking the Coulomb matrix descriptor as an example, each matrix element q would have its own column of the Jacobian. The rows would then contain the derivatives by all atom coordinates.
Jacobian:

        (dq1/d_atom1_x   dq2/d_atom1_x   ...)
        (dq1/d_atom1_y   dq2/d_atom1_y   ...)
dq/dx = (dq1/d_atom1_z   dq2/d_atom1_z   ...)
        (dq1/d_atom2_x   dq2_d_atom2_x   ...)
        (      :              :           . )

More generally speaking, the Jacobian would have 3*number_of_atoms rows and length_of_flattened_descriptor columns.

I am looking forward to the next release!

Best regards,
coolcodecamper

requirements interference with matminer

We use dscribe to implement some of the featurizer classes we have in matminer, and we'd like to keep current with improvements to dscribe (it really is a great code thank you for making it!!). Version 0.1.8 works great and we are trying to upgrade to newer versions.

However it seems there are some problems between dscribe's pip requirements (in particular 0.2.5) and matminer's. For one, it seems dscribe 0.2.5 is dependent on matminer, which makes them are circularly dependent.

Secondarily, dscribe 0.2.5's install also installs sklearn 0.20.3 while we are upgrading matminer to 0.21.3, which will create a pip version conflict (fatal error) any time someone wants to install one software from the other (e.g., installing matminer also installs dscribe which causes fatal sklearn version conflict error, or vice versa).

Would the devs of dscribe be interested in working with the matminer devs to make our softwares more compatible?

import error of `acsfwrapper` in version `0.3.2`

acsfwrapper cannot be imported in version 0.3.2

Here is the full conda env yml (as a .txt, otherwise github is not happy with it)
conda_env.yml.txt

In [2]: from dscribe.descriptors import SOAP                                                                                                                                    
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-03308a51f02f> in <module>
----> 1 from dscribe.descriptors import SOAP

/opt/conda/envs/projection/lib/python3.7/site-packages/dscribe/descriptors/__init__.py in <module>
     15 """
     16 from dscribe.descriptors.descriptor import Descriptor
---> 17 from dscribe.descriptors.acsf import ACSF
     18 from dscribe.descriptors.mbtr import MBTR
     19 from dscribe.descriptors.lmbtr import LMBTR

/opt/conda/envs/projection/lib/python3.7/site-packages/dscribe/descriptors/acsf.py in <module>
     25 from ase import Atoms
     26 
---> 27 from dscribe.libacsf.acsfwrapper import ACSFWrapper
     28 import dscribe.utils.geometry
     29 

ModuleNotFoundError: No module named 'dscribe.libacsf.acsfwrapper'

The file exists in the env directory:

(projection) root@99c7ed173fe0:/opt/conda/envs/projection/lib/python3.7/site-packages/dscribe/libacsf# ls -l
total 364
-rw-rw-r-- 2 root root      0 Dec 25 22:17 __init__.py
drwxr-xr-x 2 root root   4096 Feb  6 12:42 __pycache__
-rw-rw-r-- 2 root root   6560 Dec 25 22:17 acsf.cpp
-rw-rw-r-- 2 root root   2082 Dec 25 22:17 acsf.h
-rw-rw-r-- 2 root root 241706 Dec 25 22:17 acsfwrapper.cpp
-rwxrwxr-x 2 root root 109696 Dec 25 22:17 acsfwrapper.cpython-37-x86_64-linux-gnu.so

but even in there it is not importable:

(projection) root@99c7ed173fe0:/opt/conda/envs/projection/lib/python3.7/site-packages/dscribe/libacsf# ipython
Python 3.7.3 | packaged by conda-forge | (default, Dec  6 2019, 08:54:18) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import acsfwrapper                                                                                                                                                      
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-d7b8cade2c17> in <module>
----> 1 import acsfwrapper

ModuleNotFoundError: No module named 'acsfwrapper'

typo in the main README

hi !

in the main readme, you have "Smooth Overlap of Atomic Orbitals (SOAP)" . the P in SOAP stands for "Positions" not for "Orbitals". Doing orbitals (so varying the Gaussians that are placed on atoms, perhaps adding l>0 functions on each neighbour) is an interesting idea, I am not aware of anyone trying that for an environment - it is related to Stefan Goedecker's fingerprints (but after placing the orbitals, he doesn't compute the rotationally invariant overlap, he diagonalises the overlap matrix to get his fingerprints).

installation error with pip

Hello,

I'm getting the following error when I tried to install dscribe (Mac OS Big Sur 11.1)

I used a clean conda environment with numpy and scipy, ran pip install dscribe and got this error. From my understanding, it looks like some files are missing from the source? Tried to build it from github source as suggested by the documentation, got the same errors.

Any advice? Thanks in advance.

Processing /Users/mac/dscribe
Requirement already satisfied: pybind11>=2.4 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (2.6.1)
Requirement already satisfied: numpy in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (1.19.2)
Requirement already satisfied: scipy in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (1.5.2)
Requirement already satisfied: ase>=3.19.0 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (3.21.0)
Requirement already satisfied: scikit-learn in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (0.24.1)
Requirement already satisfied: joblib in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from dscribe==0.4.1a0) (1.0.0)
Requirement already satisfied: matplotlib>=2.0.0 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from ase>=3.19.0->dscribe==0.4.1a0) (3.3.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (1.3.1)
Requirement already satisfied: python-dateutil>=2.1 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (8.1.0)
Requirement already satisfied: six in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from cycler>=0.10->matplotlib>=2.0.0->ase>=3.19.0->dscribe==0.4.1a0) (1.15.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /opt/anaconda3/envs/dscribe/lib/python3.9/site-packages (from scikit-learn->dscribe==0.4.1a0) (2.1.0)
Building wheels for collected packages: dscribe
Building wheel for dscribe (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/envs/dscribe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"'; file='"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-wheel-6r3d7y75
cwd: /private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/
Complete output (67 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/dscribe
copying dscribe/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/localsimilaritykernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/averagekernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/rematchkernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/system.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/lattice.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/species.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/stats.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/geometry.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/descriptor.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/elementaldistribution.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/matrixdescriptor.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/soap.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/coulombmatrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/acsf.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/sinematrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/lmbtr.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/mbtr.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
running egg_info
creating dscribe.egg-info
writing dscribe.egg-info/PKG-INFO
writing dependency_links to dscribe.egg-info/dependency_links.txt
writing requirements to dscribe.egg-info/requires.txt
writing top-level names to dscribe.egg-info/top_level.txt
writing manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.h' under directory 'dscribe/libmbtr'
warning: no files found matching '
.cpp' under directory 'dscribe/libmbtr'
warning: no files found matching '.h' under directory 'dscribe/libacsf'
warning: no files found matching '
.cpp' under directory 'dscribe/libacsf'
writing manifest file 'dscribe.egg-info/SOURCES.txt'
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/acsf.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/acsf.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/celllist.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/celllist.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/ext.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/mbtr.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/mbtr.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGTO.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGTO.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGeneral.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGeneral.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
running build_ext
building 'dscribe.ext' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/dscribe
creating build/temp.macosx-10.9-x86_64-3.9/dscribe/ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/dscribe/include -arch x86_64 -fPIC -O2 -isystem /opt/anaconda3/envs/dscribe/include -arch x86_64 -Idscribe/ext -I/opt/anaconda3/envs/dscribe/lib/python3.9/site-packages/pybind11/include -I/opt/anaconda3/envs/dscribe/lib/python3.9/site-packages/pybind11/include -I/opt/anaconda3/envs/dscribe/include/python3.9 -c dscribe/ext/acsf.cpp -o build/temp.macosx-10.9-x86_64-3.9/dscribe/ext/acsf.o -std=c++11 -O3 -fvisibility=hidden
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit code 1

ERROR: Failed building wheel for dscribe
Running setup.py clean for dscribe
Failed to build dscribe
Installing collected packages: dscribe
Running setup.py install for dscribe ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/envs/dscribe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"'; file='"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-record-z6ylr7i5/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/envs/dscribe/include/python3.9/dscribe
cwd: /private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/
Complete output (65 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/dscribe
copying dscribe/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/localsimilaritykernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/averagekernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
copying dscribe/kernels/rematchkernel.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/kernels
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/system.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
copying dscribe/core/lattice.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/core
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/species.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/stats.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
copying dscribe/utils/geometry.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/utils
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/descriptor.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/elementaldistribution.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/matrixdescriptor.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/soap.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/init.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/coulombmatrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/acsf.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/sinematrix.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/lmbtr.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
copying dscribe/descriptors/mbtr.py -> build/lib.macosx-10.9-x86_64-3.9/dscribe/descriptors
running egg_info
writing dscribe.egg-info/PKG-INFO
writing dependency_links to dscribe.egg-info/dependency_links.txt
writing requirements to dscribe.egg-info/requires.txt
writing top-level names to dscribe.egg-info/top_level.txt
reading manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.h' under directory 'dscribe/libmbtr'
warning: no files found matching '
.cpp' under directory 'dscribe/libmbtr'
warning: no files found matching '.h' under directory 'dscribe/libacsf'
warning: no files found matching '
.cpp' under directory 'dscribe/libacsf'
writing manifest file 'dscribe.egg-info/SOURCES.txt'
creating build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/acsf.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/acsf.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/celllist.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/celllist.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/ext.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/mbtr.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/mbtr.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGTO.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGTO.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGeneral.cpp -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
copying dscribe/ext/soapGeneral.h -> build/lib.macosx-10.9-x86_64-3.9/dscribe/ext
running build_ext
building 'dscribe.ext' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/dscribe
creating build/temp.macosx-10.9-x86_64-3.9/dscribe/ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/dscribe/include -arch x86_64 -fPIC -O2 -isystem /opt/anaconda3/envs/dscribe/include -arch x86_64 -Idscribe/ext -I/opt/anaconda3/envs/dscribe/lib/python3.9/site-packages/pybind11/include -I/opt/anaconda3/envs/dscribe/lib/python3.9/site-packages/pybind11/include -I/opt/anaconda3/envs/dscribe/include/python3.9 -c dscribe/ext/acsf.cpp -o build/temp.macosx-10.9-x86_64-3.9/dscribe/ext/acsf.o -std=c++11 -O3 -fvisibility=hidden
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/envs/dscribe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"'; file='"'"'/private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-req-build-466mwvg6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/l9/h3jppwwn11b0c6cct25t47yh0000gn/T/pip-record-z6ylr7i5/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/envs/dscribe/include/python3.9/dscribe Check the logs for full command output.

Radial decay for SOAP

As mentioned in [1] and [2], radial scaling of the SOAP features can be beneficial especially when using machine learning methods that put equal weight to the different features (e.g. kernel methods). Inspired by this discussion, this feature should be added to our SOAP implementation.

The initial implementation would simply scale the atom centered gaussian with a radial decay function, as mentioned in [1]. This is not the same as weighting the total atomic density, but close enough as long as the gaussian width (sigma) is much smaller than changes in the decay function at that length scale.

As for the interface, maybe we could introduce a new weighting option similar to MBTR (the whole idea is very similar to weighting in MBTR). This could be a dictionary that specifies the weighting function and it's parameters. This argument could also support completely custom weighting for each atom (you give a list of weights for each atom), and possibly the concept of using a custom weight for the central atom, as provided by quippy. This would easily allow us to introduce different cutoff function definitions and pass them to the C-extension. The weighting is also logically connected to cut: if the weighting goes to zero before rcut is reached, the effective rcut should be reduced. Another option is to completely replace rcut with this weighting option.

Any comments on this are greatly appreciated!

[1] Michael J. Willatt, Felix Musil an Michele Ceriotti, Feature optimization for atomistic machine learning yields a data-driven construction of the periodic table of the elements, Phys. Chem. Chem. Phys., (2018), 20, 29661--29668
[2] Miguel Caro, Optimizing many-body atomic descriptors for enhanced computational performance of machine learning based interatomic potentials, Phys. Rev. B (2019) 100, 024112

average soap

hi!

When you compute the soap vector of a structure using the "average=True" argument, what do you average over? Do you compute the soap vector for each atomic environment and then return the average of that over atoms? This is much less useful than the kind of average that the QUIP code does, which is to compute the Ylm expansion around each atom, average those, and then square that average vector to get the single soap vector of the structure. This latter method retains the orientation relationships between the different environments, and is invariant only with respect to a global rotation of the entire structure. The first way is invariant to rotations of each environment separately.

Allow changing descriptor setup through python properties

Currently the code has inconsistent handling for changing properties of the descriptor objects. Many of the properties are available through public attributes of the objects, but sometimes changing them after initialization can lead to a broken setup.

This should be fixed by introducing a python property for each attribute that can be changed after the construction of an object. A property can then trigger the necessary actions for updating the setup of the whole object.

MBTR about mbtr.create() ---displays only features

HI! I have a question. When I use mbtr.create() , it returns array with shape[positon, features] such as below.

(0, 0) 0.00844207
(0, 1) 0.012111196
(0, 2) 0.01720821
(0, 3) 0.024216358
(0, 4) 0.033753663
(0, 5) 0.046600137
......

I want to display only features such as below .

0.00844207
0.012111196
0.01720821
0.024216358
0.033753663
0.046600137

How should I do?

Thanks!

Possible inaccuracy of SOAP descriptors for periodic systems

Hi,

I am using your package to calculate SOAP vectors for the atoms in my system. It is working very nicely, except that I get small deviations which manifest around the boundary when I try to classify the local structure.

To reproduce this, I have created the following example:

  • Create a cubic cell with atoms.
  • Redefine the cubic cell as monoclinic with an angle of 45 degrees, wrap the atoms back inside the cell.
  • Compute the difference in SOAP descriptors before and after. Ideally, this should be zero (or machine precision) in a periodic system. Instead, I get about 1e-7. The Ewald matrix achieves machine precision.

The error seems to depend on the radial cutoff (which shouldn't matter.) I have attached the script and its output.

Am I interpreting these results correctly?

import numpy as np
from numpy.linalg import norm
from numpy.random import normal
from ase import Atoms
from ase.visualize import view
from ase.io import write
from dscribe.descriptors import SOAP, EwaldSumMatrix

ncells = 5
natoms = 2 * ncells ** 3

# Loop over different radial cutoffs
for rcut in np.linspace(5, 8, 16):

    # Create descriptor generators
    soap_generator = SOAP(
        rcut=rcut, nmax=4, lmax=4, species=["Ni", "Ti"], periodic=True
    )
    ewald_generator = EwaldSumMatrix(natoms, permutation="none", flatten=False)

    # Define unit cell
    a = 2.993
    niti = Atoms(
        "NiTi",
        positions=[[0.0, 0.0, 0.0], [a / 2, a / 2, a / 2]],
        cell=[a, a, a],
        pbc=[1, 1, 1],
    )

    # Replicate system
    niti = niti * ncells
    a *= ncells

    # Add some noise to positions
    positions = niti.get_positions()
    noise = normal(size=positions.shape)
    niti.set_positions(positions + noise)
    niti.wrap()

    # Write positions of orthogonal unit cell
    write("orthogonal.xyz", niti)

    # Evaluate descriptors for orthogonal unit cell
    orthogonal_soaps = soap_generator.create(niti)
    orthogonal_ewalds = ewald_generator.create(niti)

    # Redefine the cubic unit cell as monoclinic
    # with a 45-degree angle,
    # this should not affect the descriptors
    niti.set_cell([[a, 0, 0], [0, a, 0], [a, 0, a]])
    niti.wrap()

    write("nonorthogonal.xyz", niti)

    # Evaluate descriptors for new, monoclinic unit cell
    non_orthogonal_soaps = soap_generator.create(niti)
    non_orthogonal_ewalds = ewald_generator.create(niti)

    # Calculate error for the two descriptors
    soap_error = norm(orthogonal_soaps - non_orthogonal_soaps) / norm(orthogonal_soaps)
    ewald_error = norm(orthogonal_ewalds - non_orthogonal_ewalds) / norm(
        orthogonal_ewalds
    )
    print(
        f"rcut = {rcut:.2e}, SOAP error: {soap_error:.2e}, Ewald error: {ewald_error:.2e}"
    )

"""
Sample output:
rcut = 5.00e+00, SOAP error: 0.00e+00, Ewald error: 1.19e-15
rcut = 5.20e+00, SOAP error: 0.00e+00, Ewald error: 1.14e-15
rcut = 5.40e+00, SOAP error: 0.00e+00, Ewald error: 1.54e-15
rcut = 5.60e+00, SOAP error: 0.00e+00, Ewald error: 7.71e-16
rcut = 5.80e+00, SOAP error: 0.00e+00, Ewald error: 9.89e-16
rcut = 6.00e+00, SOAP error: 1.62e-08, Ewald error: 7.77e-16
rcut = 6.20e+00, SOAP error: 1.27e-08, Ewald error: 7.33e-16
rcut = 6.40e+00, SOAP error: 3.32e-08, Ewald error: 1.03e-15
rcut = 6.60e+00, SOAP error: 5.91e-08, Ewald error: 1.10e-15
rcut = 6.80e+00, SOAP error: 2.20e-07, Ewald error: 1.61e-15
rcut = 7.00e+00, SOAP error: 2.26e-07, Ewald error: 9.01e-16
rcut = 7.20e+00, SOAP error: 2.99e-07, Ewald error: 1.14e-15
rcut = 7.40e+00, SOAP error: 1.13e-06, Ewald error: 1.33e-15
rcut = 7.60e+00, SOAP error: 0.00e+00, Ewald error: 1.28e-15
rcut = 7.80e+00, SOAP error: 0.00e+00, Ewald error: 1.61e-15
rcut = 8.00e+00, SOAP error: 0.00e+00, Ewald error: 9.49e-16
"""

Reading in molecules

Hello apologies if this has an easy solution, if so then it is very hard to find.

I would like to use library however it doesn't seem like there are any examples of reading in many molecules. I am looking to work with either sdfs or rdkit mols but it is very hard to transform them into whatever data structure you are using.

Can you please have an example of creating structures by reading in an sdf with multiple molecules or with a list of rdkit mols? I can also convert sdf to xyz but I don't know how to get xyz file with multiple molecules into multiple structures.

extracting features using MBTR for crystals

Dear Lauri,

I would like to use MBTR to train a dataset of crystalline systems. I have 6000 data points and my dataset consists of ~88 different elements. Using get_number_of_features()-function, I got 1 x 33695100 for the size of vectors for each periodic crystal which is extremely big and sparse. Therefore it takes forever to extract features for my dataset. Am I doing something wrong or for MBTR such big vectors are normal?

In addition, it seems that there are many parameters in MBTR that need to be tuned for k1,k2 and k3. Considering the above issue, examining all possible combinations of these parameters will become really time consuming. I am wondering if you have any suggestion to get around these issues.

Thanks much for your time!

MBTR.get_num_features()

this method is no longer working it should be changed to:

def get_number_of_features(self):
    """Used to inquire the final number of features that this descriptor
    will have.

    Returns:
        int: Number of features for this descriptor.
    """
    n_features = 0
    n_elem = self.n_elements

    if self.k >= 1:
        n_k1_grid = self.get_k1_settings()["n"]
        n_k1 = n_elem*n_k1_grid
        n_features += n_k1
    if self.k >= 2:
        n_k2_grid = self.get_k2_settings()["n"]
        n_k2 = (n_elem*(n_elem+1)/2)*n_k2_grid
        n_features += n_k2
    if self.k >= 3:
        n_k3_grid = self.get_k3_settings()["n"]
        n_k3 = (n_elem*n_elem*(n_elem+1)/2)*n_k3_grid
        n_features += n_k3

    return int(n_features)

REMatch Kernel overflow

Hello, I'm wondering if the REMatch kernel works or not, as I seem to be having the same error when I try to use it.
Here is an example code for reference

water = build.molecule("H2O")`
s = descriptors.SOAP(species=["H", "O", "C"], rcut=2, nmax=5, lmax=5, crossover=True)
t = s.create(water)
k = kernels.REMatchKernel(metric = "linear")
print(k.get_global_similarity(k.create([t, t])))

This snippet raises an overflow error when I run it. In fact I can't seem to get it to work with any molecule.

Thank you,

Error installing with MacOS

Installing from pip install dscribe and also trying from source, my install fails at compilation with:

pip install . -e

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

-e option requires 1 argument
(common_env3) ardunn@ardmbp:~/alex/lbl/projects/common_env/dev_codes/dscribe$ pip install -e .
Obtaining file:///Users/ardunn/alex/lbl/projects/common_env/dev_codes/dscribe
Requirement already satisfied: numpy in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from dscribe==0.1.7) (1.15.2)
Requirement already satisfied: scipy in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from dscribe==0.1.7) (1.1.0)
Requirement already satisfied: ase in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from dscribe==0.1.7) (3.11.0)
Requirement already satisfied: future in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from dscribe==0.1.7) (0.16.0)
Requirement already satisfied: matplotlib in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from dscribe==0.1.7) (2.2.2)
Collecting soaplite==0.14.7 (from dscribe==0.1.7)
  Downloading https://files.pythonhosted.org/packages/ab/48/5a91b5e67ce206f4b7124b53c273e9c5b12e35e098f05f09284f03f1eaff/soaplite-0.14.7.tar.gz (44kB)
    100% |████████████████████████████████| 51kB 853kB/s 
Requirement already satisfied: six>=1.10 in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (1.11.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (2.2.0)
Requirement already satisfied: cycler>=0.10 in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (0.10.0)
Requirement already satisfied: pytz in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (2018.4)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (1.0.1)
Requirement already satisfied: python-dateutil>=2.1 in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from matplotlib->dscribe==0.1.7) (2.7.3)
Requirement already satisfied: setuptools in /Users/ardunn/alex/lbl/projects/common_env/common_env3/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->dscribe==0.1.7) (40.6.3)
Building wheels for collected packages: soaplite
  Running setup.py bdist_wheel for soaplite ... done
  Stored in directory: /Users/ardunn/Library/Caches/pip/wheels/71/76/df/bffb095ad62591a3b3b9dbae7c45923b683bd53c0bf802c479
Successfully built soaplite
Installing collected packages: soaplite, dscribe
  Found existing installation: dscribe 0.1.7
    Not uninstalling dscribe at /Users/ardunn/alex/lbl/projects/common_env/dev_codes/dscribe, outside environment /Users/ardunn/alex/lbl/projects/common_env/common_env3
    Can't uninstall 'dscribe'. No files were found to uninstall.
  Running setup.py develop for dscribe
    Complete output from command /Users/ardunn/alex/lbl/projects/common_env/common_env3/bin/python3 -c "import setuptools, tokenize;__file__='/Users/ardunn/alex/lbl/projects/common_env/dev_codes/dscribe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    running develop
    running egg_info
    writing dscribe.egg-info/PKG-INFO
    writing dependency_links to dscribe.egg-info/dependency_links.txt
    writing requirements to dscribe.egg-info/requires.txt
    writing top-level names to dscribe.egg-info/top_level.txt
    reading manifest file 'dscribe.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'LICENSE.txt'
    writing manifest file 'dscribe.egg-info/SOURCES.txt'
    running build_ext
    building 'dscribe.libacsf.libacsf' extension
    creating build
    creating build/temp.macosx-10.6-intel-3.6
    creating build/temp.macosx-10.6-intel-3.6/dscribe
    creating build/temp.macosx-10.6-intel-3.6/dscribe/libacsf
    /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Idscribe/libacsf -I/Users/ardunn/alex/lbl/projects/common_env/common_env3/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c dscribe/libacsf/acsf-utils.c -o build/temp.macosx-10.6-intel-3.6/dscribe/libacsf/acsf-utils.o -O3 -std=c99
    /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Idscribe/libacsf -I/Users/ardunn/alex/lbl/projects/common_env/common_env3/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c dscribe/libacsf/acsf-compute.c -o build/temp.macosx-10.6-intel-3.6/dscribe/libacsf/acsf-compute.o -O3 -std=c99
    creating build/lib.macosx-10.6-intel-3.6
    creating build/lib.macosx-10.6-intel-3.6/dscribe
    creating build/lib.macosx-10.6-intel-3.6/dscribe/libacsf
    /usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.6/dscribe/libacsf/acsf-utils.o build/temp.macosx-10.6-intel-3.6/dscribe/libacsf/acsf-compute.o -o build/lib.macosx-10.6-intel-3.6/dscribe/libacsf/libacsf.cpython-36m-darwin.so
    ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
    building 'dscribe.libmbtr.cmbtrwrapper' extension
    creating build/temp.macosx-10.6-intel-3.6/dscribe/libmbtr
    /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Idscribe/libmbtr -I/Users/ardunn/alex/lbl/projects/common_env/common_env3/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c dscribe/libmbtr/cmbtrwrapper.cpp -o build/temp.macosx-10.6-intel-3.6/dscribe/libmbtr/cmbtrwrapper.o -std=c++11
    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    dscribe/libmbtr/cmbtrwrapper.cpp:599:10: fatal error: 'ios' file not found
    #include "ios"
             ^~~~~
    1 warning and 1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
    
    ----------------------------------------
  Can't roll back dscribe; was not uninstalled
Command "/Users/ardunn/alex/lbl/projects/common_env/common_env3/bin/python3 -c "import setuptools, tokenize;__file__='/Users/ardunn/alex/lbl/projects/common_env/dev_codes/dscribe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in /Users/ardunn/alex/lbl/projects/common_env/dev_codes/dscribe/

Any ideas on how to fix this?

Slow generation of kernels

Currently, the implementation of dscribe.kernels.localsimilaritykernel.LocalSimilarityKernel.create is quite slow if dealing with a large number of samples, each of which has a very large SOAP matrix. I imagine this is because of the many calls of C_ij = self.get_pairwise_matrix(x_i, y_j) as you loop through every pair of materials (excluding symmetric ones). Calculating the SOAP matrices is extremely quick in comparison to running the results through the AverageKernel.

Are there any plans to increase the efficiency of this process? Right now, I have (for example) 10,000 materials and am looking to get the (10,000 x 10,000) average kernel matrix from SOAP features. So, what I'm doing right now is splitting the single calculation up into 10,000 calculations of calculating the (1 x 10,000) matrix and then appending the results together in the end. Obviously, this embarrassingly parallel solution isn't particularly efficient, and even these individual calculations are quite slow. For the record, each of my materials has ~100 atoms (and the species span most of the periodic table, unfortunately).

Just for clarity, the fully serial workflow (excluding the data splitting process) looks something like the following. The massive bottleneck is at the calculation of kernel_avg_train.

structures_train = read('structures.xyz', index=':') #all structures

#Get all unique species from structures
species = []
for structure in structures:
	syms = np.unique(structure.get_chemical_symbols()).tolist()
	for sym in syms:
		if sym not in species:
			species.append(sym)

soap = SOAP(
    species=species,
    periodic=True,
    rcut=4.0,
    nmax=8,
    lmax=6,
    sparse=True
)

#Make SOAP fingerprints
#NOTE: Normally, I split this step up to prevent huge memory overhead
#No problem here if I do the above (and it's quite fast)
soaps_train = soap.create(structures_train)
save_npz('soaps_train.npz',soaps_train)

fingerprints_train = []
old_idx = 0
#Restructure SOAP fingerprints
for structure_train in structures_train:
	n_atoms = len(structure_train)
	soap_j = soaps_train[old_idx:old_idx+n_atoms,:]
	old_idx += n_atoms
	fingerprints_train.append(soap_j)

# Calculates the similarity kernel matrix of dimensions (n_train x n_train)
avg_train = AverageKernel(metric="linear")
kernel_avg_train = avg_train.create(fingerprints_train) #slow step, even if split up over individual chunks!
np.savetxt('soap_kernel_train.csv',kernel_avg_train,delimiter=',')

pip install error in MacOS 10.14.1 python3.6

`nstalling collected packages: dscribe
Running setup.py install for dscribe ... error
Complete output from command /Users/xx/anaconda3/envs/py36/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/fk/by0sbjf95jd7cj8qddj6y0_40000gn/T/pip-n5ti89v0-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/fk/by0sbjf95jd7cj8qddj6y0_40000gn/T/pip-1ow0r_et-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/dscribe
copying dscribe/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/kernels
copying dscribe/kernels/rematch.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/kernels
copying dscribe/kernels/localsimilaritykernel.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/kernels
copying dscribe/kernels/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/kernels
copying dscribe/kernels/average.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/kernels
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/core
copying dscribe/core/system.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/core
copying dscribe/core/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/core
copying dscribe/core/lattice.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/core
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/utils
copying dscribe/utils/species.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/utils
copying dscribe/utils/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/utils
copying dscribe/utils/stats.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/utils
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/descriptor.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/elementaldistribution.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/matrixdescriptor.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/soap.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/coulombmatrix.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/acsf.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/sinematrix.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/lmbtr.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
copying dscribe/descriptors/mbtr.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/descriptors
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/libmbtr
copying dscribe/libmbtr/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libmbtr
creating build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf
copying dscribe/libacsf/init.py -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf
running egg_info
creating dscribe.egg-info
writing dscribe.egg-info/PKG-INFO
writing dependency_links to dscribe.egg-info/dependency_links.txt
writing requirements to dscribe.egg-info/requires.txt
writing top-level names to dscribe.egg-info/top_level.txt
writing manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.txt'
writing manifest file 'dscribe.egg-info/SOURCES.txt'
copying dscribe/libmbtr/mbtr.cpp -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libmbtr
copying dscribe/libmbtr/mbtr.h -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libmbtr
copying dscribe/libmbtr/mbtrwrapper.cpp -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libmbtr
copying dscribe/libacsf/acsf.cpp -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf
copying dscribe/libacsf/acsf.h -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf
copying dscribe/libacsf/acsfwrapper.cpp -> build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf
running build_ext
building 'dscribe.libacsf.acsfwrapper' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/dscribe
creating build/temp.macosx-10.7-x86_64-3.6/dscribe/libacsf
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/xx/anaconda3/envs/py36/include -arch x86_64 -I/Users/xx/anaconda3/envs/py36/include -arch x86_64 -Idscribe/libacsf -I/Users/xx/anaconda3/envs/py36/include/python3.6m -c dscribe/libacsf/acsfwrapper.cpp -o build/temp.macosx-10.7-x86_64-3.6/dscribe/libacsf/acsfwrapper.o -std=c++11 -stdlib=libc++
g++ -bundle -undefined dynamic_lookup -L/Users/xx/anaconda3/envs/py36/lib -arch x86_64 -L/Users/xx/anaconda3/envs/py36/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/dscribe/libacsf/acsfwrapper.o -o build/lib.macosx-10.7-x86_64-3.6/dscribe/libacsf/acsfwrapper.cpython-36m-darwin.so
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1

----------------------------------------

Command "/Users/xx/anaconda3/envs/py36/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/fk/by0sbjf95jd7cj8qddj6y0_40000gn/T/pip-n5ti89v0-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/fk/by0sbjf95jd7cj8qddj6y0_40000gn/T/pip-1ow0r_et-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/fk/by0sbjf95jd7cj8qddj6y0_40000gn/T/pip-n5ti89v0-build/`

soaplite nMax error message

Small thing: the number of basis functions can go up to 13, but the error message says 12, which one is it?

soaplite/core.py, line 107, in get_soap_locals
    assert nMax <= 13, "number of basis functions cannot exceed 12. nMax={}".format(nMax)

analytical derivatives w.r.t Cartesian coordinates

Dear developers,
do you see the possibility to implement and output option for analytical derivatives with respect to Cartesian coordinates for SOAPs in the near future?
Kind regards,
coolcodecamper

Non-linear (quadratic?) scaling of SOAP calculation

Hi,

With the SOAP vectors working perfectly, I turned to a "real" system with more atoms. With 250 000 atoms, each frame takes 1.5 hours.

From my experimenting (see below), it seems that the SOAP vector calculation scales approximately linearly as a function of the square of the number of atoms, i.e. quadratically with the number of atoms. This goes for both 0.2.8 and the newest GitHub version.

Since there is a cut-off for interatomic distances, I would have expected the SOAP calculation to scale linearly with the number of atoms like classical MD force fields. Is this not possible?

from tqdm import tqdm
from time import time
import numpy as np
from ase import Atoms
from dscribe.descriptors import SOAP
import matplotlib.pyplot as plt

N = []
t = []

# Loop over different system sizes
for ncells in tqdm(range(5, 21)):
    natoms = 2 * ncells ** 3

    soap_generator = SOAP(rcut=3.0, nmax=4, lmax=4, species=["Ni", "Ti"], periodic=True)

    a = 2.993
    niti = Atoms(
        "NiTi",
        positions=[[0.0, 0.0, 0.0], [a / 2, a / 2, a / 2]],
        cell=[a, a, a],
        pbc=[1, 1, 1],
    )

    # Replicate system
    niti = niti * ncells
    a *= ncells

    t0 = time()
    soaps = soap_generator.create(niti)
    t1 = time()

    N.append(natoms)
    t.append(t1 - t0)

N = np.array(N, dtype=float)
t = np.array(t, dtype=float)

plt.xlabel("(# atoms)^2")
plt.ylabel("t [s]")
plt.grid()

plt.plot(N ** 2, t, "bo")
plt.savefig("time.png")

time

Derivative of SOAP

Hi,

Is there a way to get the derivative of the SOAP descriptor corresponding to the positions? I believe the derivative is necessary if I want to do force training. I couldn't find documentation about it. Thanks!

Periodicity for ACSF

Currently, ACSF does not support periodic systems. It could, however, be easily extended to support periodicity by using the cutoff radius to determine the periodic neighbours.

SOAP kernel vs descriptor

This is not a technical question but more a question about the philosophy of SOAP.

The way I understand SOAP is that it actually provides the kernel itself directly. In that way, it is more elegant than for example the old Coulomb matrix approach, where you first produce 1D array descriptors and then later choose a kernel (e.g. rbf) and fit.

However, in practice SOAP is often implemented as an inner product of the "power spectra" of each neighborhood. The power spectra are essentially 1D descriptors again, but really they are only there as an intermediate step towards the final goal of calculating the SOAP kernel. However, if you take anything else than an inner product you are spoiling the definition of the original SOAP, that is: the overlap of gaussians placed at atomic position for two environments. If you do not use the inner product you have something else, not the overlap.

With this in mind, I am bit surprised that you seem to use SOAP as a descriptor and not as the kernel itself, as it was originally designed. Is this on purpose? Did you find that using the SOAP descriptors in another kernel lead to better results?

error installing dscribe on window 10 with jupyter notebook terminal

Hi:

I used command >pip install dscribe on jupyter notebook terminal, and it failed with message:

Cloning into 'dscribe'...
remote: Enumerating objects: 756, done.
remote: Counting objects: 100% (756/756), done.
remote: Compressing objects: 100% (390/390), done.
remote: Total 2172 (delta 518), reused 560 (delta 363), pack-reused 1416
Receiving objects: 100% (2172/2172), 7.88 MiB | 1.11 MiB/s, done.
Resolving deltas: 100% (1455/1455), done.
Processing c:\users\wusha\dscribe
Requirement already satisfied: numpy in c:\users\wusha\anaconda3\lib\site-packages (from dscribe==0.1.4) (1.14.3)
Requirement already satisfied: scipy in c:\users\wusha\anaconda3\lib\site-packages (from dscribe==0.1.4) (1.1.0)
Requirement already satisfied: ase in c:\users\wusha\anaconda3\lib\site-packages (from dscribe==0.1.4) (3.17.0)
Requirement already satisfied: future in c:\users\wusha\anaconda3\lib\site-packages (from dscribe==0.1.4) (0.17.1)
Requirement already satisfied: matplotlib in c:\users\wusha\anaconda3\lib\site-packages (from dscribe==0.1.4) (2.2.2)
Collecting soaplite==0.13.0 (from dscribe==0.1.4)
  Using cached https://files.pythonhosted.org/packages/9f/9b/67a74b229823ff7ac883bf165e1be2c0cf788d24dd1576868313c4131afd/soapl
ite-0.13.0.tar.gz
Requirement already satisfied: flask in c:\users\wusha\anaconda3\lib\site-packages (from ase->dscribe==0.1.4) (1.0.2)
Requirement already satisfied: cycler>=0.10 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->dscribe==0.1.4) (0.
10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\wusha\anaconda3\lib\site-packages (from mat
plotlib->dscribe==0.1.4) (2.2.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->dscribe==0.
1.4) (2.7.3)
Requirement already satisfied: pytz in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->dscribe==0.1.4) (2018.4)
Requirement already satisfied: six>=1.10 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->dscribe==0.1.4) (1.11.
0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->dscribe==0.1.4
) (1.0.1)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->dscribe==0.1.
4) (0.24)
Requirement already satisfied: Werkzeug>=0.14 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->dscribe==0.1.4) (
0.14.1)
Requirement already satisfied: click>=5.1 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->dscribe==0.1.4) (6.7)

Requirement already satisfied: Jinja2>=2.10 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->dscribe==0.1.4) (2.
10)
Requirement already satisfied: setuptools in c:\users\wusha\anaconda3\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->ds
cribe==0.1.4) (39.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\wusha\anaconda3\lib\site-packages (from Jinja2>=2.10->flask->ase->d
scribe==0.1.4) (1.0)
Building wheels for collected packages: dscribe, soaplite
  Running setup.py bdist_wheel for dscribe ... error
  Complete output from command c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wush
a\\AppData\\Local\\Temp\\pip-req-build-4ksi96cw\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\
r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\wusha\AppData\Local\Temp\pip-wheel-tjqv961
k --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\dscribe
  copying dscribe\__init__.py -> build\lib.win-amd64-3.6\dscribe
  creating build\lib.win-amd64-3.6\dscribe\core
  copying dscribe\core\lattice.py -> build\lib.win-amd64-3.6\dscribe\core
  copying dscribe\core\system.py -> build\lib.win-amd64-3.6\dscribe\core
  copying dscribe\core\__init__.py -> build\lib.win-amd64-3.6\dscribe\core
  creating build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\acsf.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\coulombmatrix.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\descriptor.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\elementaldistribution.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\ewaldmatrix.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\lmbtr.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\matrixdescriptor.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\mbtr.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\sinematrix.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\soap.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  copying dscribe\descriptors\__init__.py -> build\lib.win-amd64-3.6\dscribe\descriptors
  creating build\lib.win-amd64-3.6\dscribe\libmbtr
  copying dscribe\libmbtr\__init__.py -> build\lib.win-amd64-3.6\dscribe\libmbtr
  creating build\lib.win-amd64-3.6\dscribe\utils
  copying dscribe\utils\average_kernel.py -> build\lib.win-amd64-3.6\dscribe\utils
  copying dscribe\utils\batch_create.py -> build\lib.win-amd64-3.6\dscribe\utils
  copying dscribe\utils\rematch_kernel.py -> build\lib.win-amd64-3.6\dscribe\utils
  copying dscribe\utils\stats.py -> build\lib.win-amd64-3.6\dscribe\utils
  copying dscribe\utils\__init__.py -> build\lib.win-amd64-3.6\dscribe\utils
  running egg_info
  creating dscribe.egg-info
  writing dscribe.egg-info\PKG-INFO
  writing dependency_links to dscribe.egg-info\dependency_links.txt
  writing requirements to dscribe.egg-info\requires.txt
  writing top-level names to dscribe.egg-info\top_level.txt
  writing manifest file 'dscribe.egg-info\SOURCES.txt'
  reading manifest file 'dscribe.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'LICENSE.txt'
  writing manifest file 'dscribe.egg-info\SOURCES.txt'
  creating build\lib.win-amd64-3.6\dscribe\libacsf
  copying dscribe\libacsf\acsf-compute.c -> build\lib.win-amd64-3.6\dscribe\libacsf
  copying dscribe\libacsf\acsf-utils.c -> build\lib.win-amd64-3.6\dscribe\libacsf
  copying dscribe\libmbtr\cmbtrwrapper.cpp -> build\lib.win-amd64-3.6\dscribe\libmbtr
  copying dscribe\libacsf\acsf.h -> build\lib.win-amd64-3.6\dscribe\libacsf
  copying dscribe\libmbtr\cmbtr.cpp -> build\lib.win-amd64-3.6\dscribe\libmbtr
  copying dscribe\libmbtr\cmbtr.h -> build\lib.win-amd64-3.6\dscribe\libmbtr
  running build_ext
  building 'dscribe.libacsf.libacsf' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\dscribe
  creating build\temp.win-amd64-3.6\Release\dscribe\libacsf
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox
 /W3 /GL /DNDEBUG /MD -Idscribe/libacsf -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Fil
es (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft V
isual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\u
crt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10
\include\10.0.17134.0\cppwinrt" /Tcdscribe/libacsf/acsf-utils.c /Fobuild\temp.win-amd64-3.6\Release\dscribe/libacsf/acsf-utils.
obj -O3 -std=c99
  cl : Command line warning D9002 : ignoring unknown option '-O3'
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  acsf-utils.c
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox
 /W3 /GL /DNDEBUG /MD -Idscribe/libacsf -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Fil
es (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft V
isual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\u
crt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10
\include\10.0.17134.0\cppwinrt" /Tcdscribe/libacsf/acsf-compute.c /Fobuild\temp.win-amd64-3.6\Release\dscribe/libacsf/acsf-comp
ute.obj -O3 -std=c99
  cl : Command line warning D9002 : ignoring unknown option '-O3'
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  acsf-compute.c
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INC
REMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\wusha\anaconda3\libs /LIBPATH:c:\users\wusha\anac
onda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\li
b\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\
Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.
0\um\x64" m.lib /EXPORT:PyInit_libacsf build\temp.win-amd64-3.6\Release\dscribe/libacsf/acsf-utils.obj build\temp.win-amd64-3.6
\Release\dscribe/libacsf/acsf-compute.obj /OUT:build\lib.win-amd64-3.6\dscribe\libacsf\libacsf.cp36-win_amd64.pyd /IMPLIB:build
\temp.win-amd64-3.6\Release\dscribe/libacsf\libacsf.cp36-win_amd64.lib
  LINK : fatal error LNK1181: cannot open input file 'm.lib'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86
\\x64\\link.exe' failed with exit status 1181

  ----------------------------------------
  Failed building wheel for dscribe
  Running setup.py clean for dscribe
  Running setup.py bdist_wheel for soaplite ... error
  Complete output from command c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wush
a\\AppData\\Local\\Temp\\pip-install-lq1yj5mp\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().re
place('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\wusha\AppData\Local\Temp\pip-wheel
-yg8zugkz --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\soaplite
  copying soaplite\core.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\genBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\getBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\testBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\__init__.py -> build\lib.win-amd64-3.6\soaplite
  running build_ext
  building 'lib.libsoapPy' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox
 /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Files (x86)\Mic
rosoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio
\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\P
rogram Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\
um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.
0.17134.0\cppwinrt" /Tcsrc/soapAnalFullPy.c /Fobuild\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj -O3 -std=c99
  cl : Command line warning D9002 : ignoring unknown option '-O3'
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  soapAnalFullPy.c
  src/soapAnalFullPy.c(891): warning C4244: 'function': conversion from 'double' to 'size_t', possible loss of data
  creating C:\Users\wusha\AppData\Local\Temp\pip-install-lq1yj5mp\soaplite\build\lib.win-amd64-3.6\lib
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INC
REMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\wusha\anaconda3\libs /LIBPATH:c:\users\wusha\anac
onda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\li
b\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\
Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.
0\um\x64" m.lib /EXPORT:PyInit_libsoapPy build\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj /OUT:build\lib.win-amd64-3.6\l
ib\libsoapPy.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src\libsoapPy.cp36-win_amd64.lib
  LINK : fatal error LNK1181: cannot open input file 'm.lib'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86
\\x64\\link.exe' failed with exit status 1181

  ----------------------------------------
  Failed building wheel for soaplite
  Running setup.py clean for soaplite
Failed to build dscribe soaplite
Installing collected packages: soaplite, dscribe
  Running setup.py install for soaplite ... error
    Complete output from command c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wu
sha\\AppData\\Local\\Temp\\pip-install-lq1yj5mp\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().
replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\wusha\AppData\Local\Temp\pip-r
ecord-ym7xc3eq\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\soaplite
    copying soaplite\core.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\genBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\getBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\testBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\__init__.py -> build\lib.win-amd64-3.6\soaplite
    running build_ext
    building 'lib.libsoapPy' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /
Ox /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Files (x86)\M
icrosoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Stud
io\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:
\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.
0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.17134.0\cppwinrt" /Tcsrc/soapAnalFullPy.c /Fobuild\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj -O3 -std=c99
    cl : Command line warning D9002 : ignoring unknown option '-O3'
    cl : Command line warning D9002 : ignoring unknown option '-std=c99'
    soapAnalFullPy.c
    src/soapAnalFullPy.c(891): warning C4244: 'function': conversion from 'double' to 'size_t', possible loss of data
    creating C:\Users\wusha\AppData\Local\Temp\pip-install-lq1yj5mp\soaplite\build\lib.win-amd64-3.6\lib
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /I
NCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\wusha\anaconda3\libs /LIBPATH:c:\users\wusha\an
aconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\
lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C
:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.1713
4.0\um\x64" m.lib /EXPORT:PyInit_libsoapPy build\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj /OUT:build\lib.win-amd64-3.6
\lib\libsoapPy.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src\libsoapPy.cp36-win_amd64.lib
    LINK : fatal error LNK1181: cannot open input file 'm.lib'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX
86\\x64\\link.exe' failed with exit status 1181

    ----------------------------------------
Command "c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wusha\\AppData\\Local\\Tem
p\\pip-install-lq1yj5mp\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.
close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\wusha\AppData\Local\Temp\pip-record-ym7xc3eq\install-r
ecord.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\wusha\AppData\Local\Temp\pip-inst
all-lq1yj5mp\soaplite\
PS C:\Users\wusha\dscribe> pip install soaplite
Collecting soaplite
  Using cached https://files.pythonhosted.org/packages/9f/9b/67a74b229823ff7ac883bf165e1be2c0cf788d24dd1576868313c4131afd/soapl
ite-0.13.0.tar.gz
Requirement already satisfied: numpy in c:\users\wusha\anaconda3\lib\site-packages (from soaplite) (1.14.3)
Requirement already satisfied: scipy in c:\users\wusha\anaconda3\lib\site-packages (from soaplite) (1.1.0)
Requirement already satisfied: ase in c:\users\wusha\anaconda3\lib\site-packages (from soaplite) (3.17.0)
Requirement already satisfied: matplotlib in c:\users\wusha\anaconda3\lib\site-packages (from ase->soaplite) (2.2.2)
Requirement already satisfied: flask in c:\users\wusha\anaconda3\lib\site-packages (from ase->soaplite) (1.0.2)
Requirement already satisfied: cycler>=0.10 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->ase->soaplite) (0.1
0.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\wusha\anaconda3\lib\site-packages (from mat
plotlib->ase->soaplite) (2.2.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->ase->soapli
te) (2.7.3)
Requirement already satisfied: pytz in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->ase->soaplite) (2018.4)
Requirement already satisfied: six>=1.10 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->ase->soaplite) (1.11.0
)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\wusha\anaconda3\lib\site-packages (from matplotlib->ase->soaplite)
 (1.0.1)
Requirement already satisfied: Werkzeug>=0.14 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->soaplite) (0.14.1
)
Requirement already satisfied: Jinja2>=2.10 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->soaplite) (2.10)
Requirement already satisfied: click>=5.1 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->soaplite) (6.7)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\wusha\anaconda3\lib\site-packages (from flask->ase->soaplite) (0.
24)
Requirement already satisfied: setuptools in c:\users\wusha\anaconda3\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->as
e->soaplite) (39.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\wusha\anaconda3\lib\site-packages (from Jinja2>=2.10->flask->ase->s
oaplite) (1.0)
Building wheels for collected packages: soaplite
  Running setup.py bdist_wheel for soaplite ... error
  Complete output from command c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wush
a\\AppData\\Local\\Temp\\pip-install-lra8s0_m\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().re
place('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\wusha\AppData\Local\Temp\pip-wheel
-afdi3pmv --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\soaplite
  copying soaplite\core.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\genBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\getBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\testBasis.py -> build\lib.win-amd64-3.6\soaplite
  copying soaplite\__init__.py -> build\lib.win-amd64-3.6\soaplite
  running build_ext
  building 'lib.libsoapPy' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox
 /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Files (x86)\Mic
rosoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio
\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\P
rogram Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\
um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.
0.17134.0\cppwinrt" /Tcsrc/soapAnalFullPy.c /Fobuild\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj -O3 -std=c99
  cl : Command line warning D9002 : ignoring unknown option '-O3'
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  soapAnalFullPy.c
  src/soapAnalFullPy.c(891): warning C4244: 'function': conversion from 'double' to 'size_t', possible loss of data
  creating C:\Users\wusha\AppData\Local\Temp\pip-install-lra8s0_m\soaplite\build\lib.win-amd64-3.6\lib
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INC
REMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\wusha\anaconda3\libs /LIBPATH:c:\users\wusha\anac
onda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\li
b\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\
Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.
0\um\x64" m.lib /EXPORT:PyInit_libsoapPy build\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj /OUT:build\lib.win-amd64-3.6\l
ib\libsoapPy.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src\libsoapPy.cp36-win_amd64.lib
  LINK : fatal error LNK1181: cannot open input file 'm.lib'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86
\\x64\\link.exe' failed with exit status 1181

  ----------------------------------------
  Failed building wheel for soaplite
  Running setup.py clean for soaplite
Failed to build soaplite
Installing collected packages: soaplite
  Running setup.py install for soaplite ... error
    Complete output from command c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wu
sha\\AppData\\Local\\Temp\\pip-install-lra8s0_m\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().
replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\wusha\AppData\Local\Temp\pip-r
ecord-q0b_7dvz\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\soaplite
    copying soaplite\core.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\genBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\getBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\testBasis.py -> build\lib.win-amd64-3.6\soaplite
    copying soaplite\__init__.py -> build\lib.win-amd64-3.6\soaplite
    running build_ext
    building 'lib.libsoapPy' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /
Ox /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\wusha\anaconda3\include -Ic:\users\wusha\anaconda3\include "-IC:\Program Files (x86)\M
icrosoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Stud
io\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:
\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.
0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.17134.0\cppwinrt" /Tcsrc/soapAnalFullPy.c /Fobuild\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj -O3 -std=c99
    cl : Command line warning D9002 : ignoring unknown option '-O3'
    cl : Command line warning D9002 : ignoring unknown option '-std=c99'
    soapAnalFullPy.c
    src/soapAnalFullPy.c(891): warning C4244: 'function': conversion from 'double' to 'size_t', possible loss of data
    creating C:\Users\wusha\AppData\Local\Temp\pip-install-lra8s0_m\soaplite\build\lib.win-amd64-3.6\lib
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /I
NCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\wusha\anaconda3\libs /LIBPATH:c:\users\wusha\an
aconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\
lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C
:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.1713
4.0\um\x64" m.lib /EXPORT:PyInit_libsoapPy build\temp.win-amd64-3.6\Release\src/soapAnalFullPy.obj /OUT:build\lib.win-amd64-3.6
\lib\libsoapPy.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src\libsoapPy.cp36-win_amd64.lib
    LINK : fatal error LNK1181: cannot open input file 'm.lib'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX
86\\x64\\link.exe' failed with exit status 1181

    ----------------------------------------
Command "c:\users\wusha\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\wusha\\AppData\\Local\\Tem
p\\pip-install-lra8s0_m\\soaplite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.
close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\wusha\AppData\Local\Temp\pip-record-q0b_7dvz\install-r
ecord.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\wusha\AppData\Local\Temp\pip-inst
all-lra8s0_m\soaplite\

Can anyone help me with this problem?

descriptor for crystal

Hello, Thank you for this excellent project! I want to know whether the code can compute discriptors for crystal?

I'm looking forward to your reply.

Best wishes!

symmetry of terms for multi-species descriptor

HEllo there!

I have a comment about the way you compute the SOAP descriptor for multiple species. In your docs page, you quote the nested loops as (omitting the l loop)

loop z
loop z' >= z'
loop n
loop n' >=n

If there are N radial basis functions and Z species, this has N(N+1)Z(Z+1)/4 terms.

In the QUIP code, we do something different. We create a combined index nz which has length N*Z, and the corresponding loops are

loop nz
loop (nz)' >= (nz)

This has NZ(NZ+1)/2 terms, which is larger than yours. I believe that yours is incorrect, because you miss some terms. when z=z' you correctly omit n'<n terms, but when z != z', you still omit them, even though you should not, because when the two atoms are different, there is no symmetry that makes those terms the same as the n'>n terms.

Exact SOAP cutoff treatment

Hi Lauri,

Another question, this time about your SOAP implementation. (The background is that I'm so far finding consistent performance differences between yours (yours seems to work slightly better ;)) and quippy, and I want to have at least a rough idea of implementation differences.)

How exactly are you treating the rcut parameter? I have taken a brief look at the code and it seems like you're in the periodic case extending the cutoff to determine the replicas to use, but also the actual computation functions seem to add some number to the cutoff -- what's going on? If I set rcut=5, will any atoms be included that are further away than that?

Install error with 0.3.2

Hi Lauri, I've noticed that updating dscribe on our HPC system leads to errors looking like this:

Command ['/u/csutton/conda-envs/py37/bin/python', '-m', 'pip', 'ins                                               
tall', '--no-deps', '-U', 'dscribe==0.3.2'] errored with the follow  
ing output:                                                          
Collecting dscribe==0.3.2                                            
  Downloading https://files.pythonhosted.org/packages/b8/13/ff23825  
ac17f99e3a25756a9e2b256dcf278b2dad983f2d4c16206645255/dscribe-0.3.2  
.tar.gz (185kB)                                                      
Building wheels for collected packages: dscribe                      
  Building wheel for dscribe (setup.py): started                     
  Building wheel for dscribe (setup.py): finished with status 'erro  
r'                                                                   
  ERROR: Complete output from command /u/csutton/conda-envs/py37/bi  
n/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-  
install-135uzlet/dscribe/setup.py'"'"';f=getattr(tokenize, '"'"'ope  
n'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'  
\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' b  
dist_wheel -d /tmp/pip-wheel-fvyvx8z5 --python-tag cp37:             
  ERROR: running bdist_wheel                                         
  running build                                                      
  running build_py                                                   
  creating build                                                     
  creating build/lib.linux-x86_64-3.7                                
  creating build/lib.linux-x86_64-3.7/dscribe                        
  copying dscribe/__init__.py -> build/lib.linux-x86_64-3.7/dscribe  
  creating build/lib.linux-x86_64-3.7/dscribe/core                   
  copying dscribe/core/system.py -> build/lib.linux-x86_64-3.7/dscr  
ibe/core                                                             
  copying dscribe/core/__init__.py -> build/lib.linux-x86_64-3.7/ds  
cribe/core                                                           
  copying dscribe/core/lattice.py -> build/lib.linux-x86_64-3.7/dsc  
ribe/core                                                            
  creating build/lib.linux-x86_64-3.7/dscribe/libacsf                
  copying dscribe/libacsf/__init__.py -> build/lib.linux-x86_64-3.7  
/dscribe/libacsf                                                     
  creating build/lib.linux-x86_64-3.7/dscribe/kernels                
  copying dscribe/kernels/__init__.py -> build/lib.linux-x86_64-3.7  
/dscribe/kernels                                                     
  copying dscribe/kernels/localsimilaritykernel.py -> build/lib.lin  
ux-x86_64-3.7/dscribe/kernels                                        
  copying dscribe/kernels/averagekernel.py -> build/lib.linux-x86_6  
4-3.7/dscribe/kernels                                                
  copying dscribe/kernels/rematchkernel.py -> build/lib.linux-x86_6  
4-3.7/dscribe/kernels                                                
  creating build/lib.linux-x86_64-3.7/dscribe/libmbtr                
  copying dscribe/libmbtr/__init__.py -> build/lib.linux-x86_64-3.7  
/dscribe/libmbtr                                                     
  creating build/lib.linux-x86_64-3.7/dscribe/utils                  
  copying dscribe/utils/species.py -> build/lib.linux-x86_64-3.7/ds  
cribe/utils                                                          
  copying dscribe/utils/geometry.py -> build/lib.linux-x86_64-3.7/d  
scribe/utils                                                         
  copying dscribe/utils/stats.py -> build/lib.linux-x86_64-3.7/dscr  
ibe/utils                                                            
  copying dscribe/utils/__init__.py -> build/lib.linux-x86_64-3.7/d  
scribe/utils                                                         
  creating build/lib.linux-x86_64-3.7/dscribe/descriptors            
  copying dscribe/descriptors/elementaldistribution.py -> build/lib  
.linux-x86_64-3.7/dscribe/descriptors                                
  copying dscribe/descriptors/mbtr.py -> build/lib.linux-x86_64-3.7  
/dscribe/descriptors                                                 
  copying dscribe/descriptors/coulombmatrix.py -> build/lib.linux-x  
86_64-3.7/dscribe/descriptors                                        
  copying dscribe/descriptors/__init__.py -> build/lib.linux-x86_64  
-3.7/dscribe/descriptors                                             
  copying dscribe/descriptors/sinematrix.py -> build/lib.linux-x86_  
64-3.7/dscribe/descriptors                                           
  copying dscribe/descriptors/lmbtr.py -> build/lib.linux-x86_64-3.  
7/dscribe/descriptors                                                
  copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.linux-  
x86_64-3.7/dscribe/descriptors                                       
  copying dscribe/descriptors/soap.py -> build/lib.linux-x86_64-3.7  
/dscribe/descriptors                                                 
  copying dscribe/descriptors/matrixdescriptor.py -> build/lib.linu  
x-x86_64-3.7/dscribe/descriptors                                     
  copying dscribe/descriptors/acsf.py -> build/lib.linux-x86_64-3.7  
/dscribe/descriptors                                                 
  copying dscribe/descriptors/descriptor.py -> build/lib.linux-x86_  
64-3.7/dscribe/descriptors                                           
  running egg_info                                                   
  writing dscribe.egg-info/PKG-INFO                                  
  writing dependency_links to dscribe.egg-info/dependency_links.txt  
  writing requirements to dscribe.egg-info/requires.txt              
  writing top-level names to dscribe.egg-info/top_level.txt          
  reading manifest file 'dscribe.egg-info/SOURCES.txt'               
  reading manifest template 'MANIFEST.in'                            
  writing manifest file 'dscribe.egg-info/SOURCES.txt'               
  creating build/lib.linux-x86_64-3.7/dscribe/ext                    
  copying dscribe/ext/celllist.cpp -> build/lib.linux-x86_64-3.7/ds  
cribe/ext                                                            
  copying dscribe/ext/celllist.h -> build/lib.linux-x86_64-3.7/dscr  
ibe/ext                                                              
  copying dscribe/ext/ext.cpp -> build/lib.linux-x86_64-3.7/dscribe  
/ext                                                                 
  copying dscribe/ext/soapGTO.cpp -> build/lib.linux-x86_64-3.7/dsc  
ribe/ext                                                             
  copying dscribe/ext/soapGTO.h -> build/lib.linux-x86_64-3.7/dscri  
be/ext                                                               
  copying dscribe/ext/soapGeneral.cpp -> build/lib.linux-x86_64-3.7  
/dscribe/ext                                                         
  copying dscribe/ext/soapGeneral.h -> build/lib.linux-x86_64-3.7/d  
scribe/ext                                                           
  copying dscribe/libacsf/acsf.cpp -> build/lib.linux-x86_64-3.7/ds  
cribe/libacsf                                                        
  copying dscribe/libacsf/acsf.h -> build/lib.linux-x86_64-3.7/dscr  
ibe/libacsf                                                          
  copying dscribe/libacsf/acsfwrapper.cpp -> build/lib.linux-x86_64  
-3.7/dscribe/libacsf                                                 
  copying dscribe/libmbtr/mbtr.cpp -> build/lib.linux-x86_64-3.7/ds  
cribe/libmbtr                                                        
  copying dscribe/libmbtr/mbtr.h -> build/lib.linux-x86_64-3.7/dscr  
ibe/libmbtr                                                          
  copying dscribe/libmbtr/mbtrwrapper.cpp -> build/lib.linux-x86_64  
-3.7/dscribe/libmbtr                                                 
  running build_ext                                                  
  building 'dscribe.libacsf.acsfwrapper' extension                   
  creating build/temp.linux-x86_64-3.7                               
  creating build/temp.linux-x86_64-3.7/dscribe                       
  creating build/temp.linux-x86_64-3.7/dscribe/libacsf               
  gcc -pthread -B /u/csutton/conda-envs/py37/compiler_compat -Wl,--  
sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-pro  
totypes -fPIC -Idscribe/libacsf -I/u/csutton/conda-envs/py37/includ  
e/python3.7m -c dscribe/libacsf/acsfwrapper.cpp -o build/temp.linux  
-x86_64-3.7/dscribe/libacsf/acsfwrapper.o -std=c++11 -O3             
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is va  
lid for C/ObjC but not for C++                                       
  In file included from dscribe/libacsf/acsf.cpp:1,                  
                   from dscribe/libacsf/acsfwrapper.cpp:637:         
  dscribe/libacsf/acsf.h: In function ‘int __pyx_pf_7dscribe_7libac  
sf_11acsfwrapper_11ACSFWrapper___cinit__(__pyx_obj_7dscribe_7libacs  
f_11acsfwrapper_ACSFWrapper*)’:                                      
  dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>’ is used unini  
tialized in this function [-Wuninitialized]                          
   class ACSF {                                                      
         ^~~~                                                        
  dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>’ is used unini  
tialized in this function [-Wuninitialized]                          
  dscribe/libacsf/acsf.h:14:7: warning: ‘*((void*)&<anonymous> +8)’  
 is used uninitialized in this function [-Wuninitialized]            
  dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::nG4’ is   
used uninitialized in this function [-Wuninitialized]                
  dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::nG5’ is   
used uninitialized in this function [-Wuninitialized]                
  dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::rCut’ is  
 used uninitialized in this function [-Wuninitialized]               
  g++ -pthread -shared -B /u/csutton/conda-envs/py37/compiler_compa  
t -L/u/csutton/conda-envs/py37/lib -Wl,-rpath=/u/csutton/conda-envs  
/py37/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_6  
4-3.7/dscribe/libacsf/acsfwrapper.o -o build/lib.linux-x86_64-3.7/d  
scribe/libacsf/acsfwrapper.cpython-37m-x86_64-linux-gnu.so           
  /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux-x  
86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize decom  
press status for section .debug_info                                 
  /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux-x  
86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize decom  
press status for section .debug_info                                 
  /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux-x  
86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize decom  
press status for section .debug_info                                 
  /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux-x  
86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize decom  
press status for section .debug_info                                 
  build/temp.linux-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: file n  
ot recognized: file format not recognized                            
  collect2: error: ld returned 1 exit status                         
  error: command 'g++' failed with exit status 1                     
  ----------------------------------------                           
  ERROR: Failed building wheel for dscribe                           
  Running setup.py clean for dscribe                                 
Failed to build dscribe                                              
Installing collected packages: dscribe                               
  Found existing installation: dscribe 0.2.9                         
    Uninstalling dscribe-0.2.9:                                      
      Successfully uninstalled dscribe-0.2.9                         
  Running setup.py install for dscribe: started                      
    Running setup.py install for dscribe: finished with status 'err  
or'                                                                  
    ERROR: Complete output from command /u/csutton/conda-envs/py37/  
bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pi  
p-install-135uzlet/dscribe/setup.py'"'"';f=getattr(tokenize, '"'"'o  
pen'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'  
"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'  
 install --record /tmp/pip-record-9_718fyc/install-record.txt --sin  
gle-version-externally-managed --compile:                            
    ERROR: running install                                           
    running build                                                    
    running build_py                                                 
    creating build                                                   
    creating build/lib.linux-x86_64-3.7                              
    creating build/lib.linux-x86_64-3.7/dscribe                      
    copying dscribe/__init__.py -> build/lib.linux-x86_64-3.7/dscri  
be                                                                   
    creating build/lib.linux-x86_64-3.7/dscribe/core                 
    copying dscribe/core/system.py -> build/lib.linux-x86_64-3.7/ds  
cribe/core                                                           
    copying dscribe/core/__init__.py -> build/lib.linux-x86_64-3.7/  
dscribe/core                                                         
    copying dscribe/core/lattice.py -> build/lib.linux-x86_64-3.7/d  
scribe/core                                                          
    creating build/lib.linux-x86_64-3.7/dscribe/libacsf              
    copying dscribe/libacsf/__init__.py -> build/lib.linux-x86_64-3  
.7/dscribe/libacsf                                                   
    creating build/lib.linux-x86_64-3.7/dscribe/kernels              
    copying dscribe/kernels/__init__.py -> build/lib.linux-x86_64-3  
.7/dscribe/kernels                                                   
    copying dscribe/kernels/localsimilaritykernel.py -> build/lib.l  
inux-x86_64-3.7/dscribe/kernels                                      
    copying dscribe/kernels/averagekernel.py -> build/lib.linux-x86  
_64-3.7/dscribe/kernels                                              
    copying dscribe/kernels/rematchkernel.py -> build/lib.linux-x86  
_64-3.7/dscribe/kernels                                              
    creating build/lib.linux-x86_64-3.7/dscribe/libmbtr              
    copying dscribe/libmbtr/__init__.py -> build/lib.linux-x86_64-3  
.7/dscribe/libmbtr                                                   
    creating build/lib.linux-x86_64-3.7/dscribe/utils                
    copying dscribe/utils/species.py -> build/lib.linux-x86_64-3.7/  
dscribe/utils                                                        
    copying dscribe/utils/geometry.py -> build/lib.linux-x86_64-3.7  
/dscribe/utils                                                       
    copying dscribe/utils/stats.py -> build/lib.linux-x86_64-3.7/ds  
cribe/utils                                                          
    copying dscribe/utils/__init__.py -> build/lib.linux-x86_64-3.7  
/dscribe/utils                                                       
    creating build/lib.linux-x86_64-3.7/dscribe/descriptors          
    copying dscribe/descriptors/elementaldistribution.py -> build/l  
ib.linux-x86_64-3.7/dscribe/descriptors                              
    copying dscribe/descriptors/mbtr.py -> build/lib.linux-x86_64-3  
.7/dscribe/descriptors                                               
    copying dscribe/descriptors/coulombmatrix.py -> build/lib.linux  
-x86_64-3.7/dscribe/descriptors                                      
    copying dscribe/descriptors/__init__.py -> build/lib.linux-x86_  
64-3.7/dscribe/descriptors                                           
    copying dscribe/descriptors/sinematrix.py -> build/lib.linux-x8  
6_64-3.7/dscribe/descriptors                                         
    copying dscribe/descriptors/lmbtr.py -> build/lib.linux-x86_64-  
3.7/dscribe/descriptors                                              
    copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.linu  
x-x86_64-3.7/dscribe/descriptors                                     
    copying dscribe/descriptors/soap.py -> build/lib.linux-x86_64-3  
.7/dscribe/descriptors                                               
    copying dscribe/descriptors/matrixdescriptor.py -> build/lib.li  
nux-x86_64-3.7/dscribe/descriptors                                   
    copying dscribe/descriptors/acsf.py -> build/lib.linux-x86_64-3  
.7/dscribe/descriptors                                               
    copying dscribe/descriptors/descriptor.py -> build/lib.linux-x8  
6_64-3.7/dscribe/descriptors                                         
    running egg_info                                                 
    writing dscribe.egg-info/PKG-INFO                                
    writing dependency_links to dscribe.egg-info/dependency_links.t  
xt                                                                   
    writing requirements to dscribe.egg-info/requires.txt            
    writing top-level names to dscribe.egg-info/top_level.txt        
    reading manifest file 'dscribe.egg-info/SOURCES.txt'             
    reading manifest template 'MANIFEST.in'                          
    writing manifest file 'dscribe.egg-info/SOURCES.txt'             
    creating build/lib.linux-x86_64-3.7/dscribe/ext                  
    copying dscribe/ext/celllist.cpp -> build/lib.linux-x86_64-3.7/  
dscribe/ext                                                          
    copying dscribe/ext/celllist.h -> build/lib.linux-x86_64-3.7/ds  
cribe/ext                                                            
    copying dscribe/ext/ext.cpp -> build/lib.linux-x86_64-3.7/dscri  
be/ext                                                               
    copying dscribe/ext/soapGTO.cpp -> build/lib.linux-x86_64-3.7/d  
scribe/ext                                                           
    copying dscribe/ext/soapGTO.h -> build/lib.linux-x86_64-3.7/dsc  
ribe/ext                                                             
    copying dscribe/ext/soapGeneral.cpp -> build/lib.linux-x86_64-3  
.7/dscribe/ext                                                       
    copying dscribe/ext/soapGeneral.h -> build/lib.linux-x86_64-3.7  
/dscribe/ext                                                         
    copying dscribe/libacsf/acsf.cpp -> build/lib.linux-x86_64-3.7/  
dscribe/libacsf                                                      
    copying dscribe/libacsf/acsf.h -> build/lib.linux-x86_64-3.7/ds  
cribe/libacsf                                                        
    copying dscribe/libacsf/acsfwrapper.cpp -> build/lib.linux-x86_  
64-3.7/dscribe/libacsf                                               
    copying dscribe/libmbtr/mbtr.cpp -> build/lib.linux-x86_64-3.7/  
dscribe/libmbtr                                                      
    copying dscribe/libmbtr/mbtr.h -> build/lib.linux-x86_64-3.7/ds  
cribe/libmbtr                                                        
    copying dscribe/libmbtr/mbtrwrapper.cpp -> build/lib.linux-x86_  
64-3.7/dscribe/libmbtr                                               
    running build_ext                                                
    building 'dscribe.libacsf.acsfwrapper' extension                 
    creating build/temp.linux-x86_64-3.7                             
    creating build/temp.linux-x86_64-3.7/dscribe                     
    creating build/temp.linux-x86_64-3.7/dscribe/libacsf             
    gcc -pthread -B /u/csutton/conda-envs/py37/compiler_compat -Wl,  
--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-p  
rototypes -fPIC -Idscribe/libacsf -I/u/csutton/conda-envs/py37/incl  
ude/python3.7m -c dscribe/libacsf/acsfwrapper.cpp -o build/temp.lin  
ux-x86_64-3.7/dscribe/libacsf/acsfwrapper.o -std=c++11 -O3           
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is   
valid for C/ObjC but not for C++                                     
    In file included from dscribe/libacsf/acsf.cpp:1,                
                     from dscribe/libacsf/acsfwrapper.cpp:637:       
    dscribe/libacsf/acsf.h: In function ‘int __pyx_pf_7dscribe_7lib  
acsf_11acsfwrapper_11ACSFWrapper___cinit__(__pyx_obj_7dscribe_7liba  
csf_11acsfwrapper_ACSFWrapper*)’:                                    
    dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>’ is used uni  
nitialized in this function [-Wuninitialized]                        
     class ACSF {                                                    
           ^~~~                                                      
    dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>’ is used uni  
nitialized in this function [-Wuninitialized]                        
    dscribe/libacsf/acsf.h:14:7: warning: ‘*((void*)&<anonymous> +8  
)’ is used uninitialized in this function [-Wuninitialized]          
    dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::nG4’ i  
s used uninitialized in this function [-Wuninitialized]              
    dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::nG5’ i  
s used uninitialized in this function [-Wuninitialized]              
    dscribe/libacsf/acsf.h:14:7: warning: ‘<anonymous>.ACSF::rCut’   
is used uninitialized in this function [-Wuninitialized]             
    g++ -pthread -shared -B /u/csutton/conda-envs/py37/compiler_com  
pat -L/u/csutton/conda-envs/py37/lib -Wl,-rpath=/u/csutton/conda-en  
vs/py37/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86  
_64-3.7/dscribe/libacsf/acsfwrapper.o -o build/lib.linux-x86_64-3.7  
/dscribe/libacsf/acsfwrapper.cpython-37m-x86_64-linux-gnu.so         
    /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux  
-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize dec  
ompress status for section .debug_info                               
    /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux  
-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize dec  
ompress status for section .debug_info                               
    /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux  
-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize dec  
ompress status for section .debug_info                               
    /u/csutton/conda-envs/py37/compiler_compat/ld: build/temp.linux  
-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: unable to initialize dec  
ompress status for section .debug_info                               
    build/temp.linux-x86_64-3.7/dscribe/libacsf/acsfwrapper.o: file  
 not recognized: file format not recognized                          
    collect2: error: ld returned 1 exit status                       
    error: command 'g++' failed with exit status 1                   
    ----------------------------------------                         
  Rolling back uninstall of dscribe                                  
  Moving to /talos/u/csutton/conda-envs/py37/lib/python3.7/site-pac  
kages/dscribe-0.2.9.dist-info/                                       
   from /talos/u/csutton/conda-envs/py37/lib/python3.7/site-package  
s/~scribe-0.2.9.dist-info                                            
  Moving to /talos/u/csutton/conda-envs/py37/lib/python3.7/site-pac  
kages/dscribe/                                                       
   from /talos/u/csutton/conda-envs/py37/lib/python3.7/site-package  
s/~scribe                                                            
ERROR: Command "/u/csutton/conda-envs/py37/bin/python -u -c 'import  
 setuptools, tokenize;__file__='"'"'/tmp/pip-install-135uzlet/dscri  
be/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__  
);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exe  
c(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/p  
ip-record-9_718fyc/install-record.txt --single-version-externally-m  
anaged --compile" failed with error code 1 in /tmp/pip-install-135u  
zlet/dscribe/                                              

This is installing via poetry, but pip gives the same errors.

MBTR Weighting function

Hi everyone,

another quick question: In MBTR, is the exp weighting function always using the distance? I.e. is the x in exp(-s*x) the distance?

Thanks,

Marcel

failed to install Dsribe on win10 system

I was so glad to see your package of Dsribe, but I failed to install it on my windows system. I wonder whether you could help me install your package on windows system, or provide a installation guide for windows system. Thanks.

Only consider part of the total atom species?

Hi,

When SOAP is dealing with a dataset with a wide variety of atom species, the size of the descriptor can get very large (for my case 300K). With the size of descriptor like this, train a regression model can be very time consuming as well as not really make sense. (since the number of features is way bigger than the number of structures). So is it possible to calculate SOAP only on a selected set or a sub-set of atomic species instead of on the whole set of atom species?

How to deal with training set with different number of species using SOAPlite?

Hi,
I'm a little bit confused with the size of the output descriptor. Based on the document of SOAPlite, I understand that the size is partially dependent on the number of species in the structure (Ts), however, what if I want to train an ML model with a training set containing structures with different number of species? In that case, the size of the output descriptor will be different from each other which will prevent the following machine learning process right? Am I understanding this wrong or there are some ways to fix this problem?

pip compile error: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]

I am trying to pip install dscribe on Arch linux with python 3.8 and get the following error:

pip install --user dscribe
Collecting dscribe
  Downloading https://files.pythonhosted.org/packages/b8/13/ff23825ac17f99e3a25756a9e2b256dcf278b2dad983f2d4c16206645255/dscribe-0.3.2.tar.gz (185kB)
     |████████████████████████████████| 194kB 412kB/s 
Requirement already satisfied: pybind11>=2.4 in /usr/lib/python3.8/site-packages (from dscribe) (2.4.3)
Requirement already satisfied: numpy in /usr/lib/python3.8/site-packages (from dscribe) (1.18.1)
Requirement already satisfied: scipy in /usr/lib/python3.8/site-packages (from dscribe) (1.4.1)
Requirement already satisfied: ase>=3.19.0 in /usr/lib/python3.8/site-packages (from dscribe) (3.19.0)
Requirement already satisfied: scikit-learn in /usr/lib/python3.8/site-packages (from dscribe) (0.22)
Requirement already satisfied: joblib in /usr/lib/python3.8/site-packages (from dscribe) (0.14.1)
Requirement already satisfied: matplotlib in /usr/lib/python3.8/site-packages (from ase>=3.19.0->dscribe) (3.1.2)
Requirement already satisfied: cycler>=0.10 in /usr/lib/python3.8/site-packages (from matplotlib->ase>=3.19.0->dscribe) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/lib/python3.8/site-packages (from matplotlib->ase>=3.19.0->dscribe) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/lib/python3.8/site-packages (from matplotlib->ase>=3.19.0->dscribe) (2.4.6)
Requirement already satisfied: python-dateutil>=2.1 in /usr/lib/python3.8/site-packages (from matplotlib->ase>=3.19.0->dscribe) (2.8.1)
Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->ase>=3.19.0->dscribe) (1.13.0)
Requirement already satisfied: setuptools in /usr/lib/python3.8/site-packages (from kiwisolver>=1.0.1->matplotlib->ase>=3.19.0->dscribe) (43.0.0)
Installing collected packages: dscribe
    Running setup.py install for dscribe ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4iw9lqz5/dscribe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4iw9lqz5/dscribe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-a8omy8ap/install-record.txt --single-version-externally-managed --compile --user --prefix=
         cwd: /tmp/pip-install-4iw9lqz5/dscribe/
    Complete output (129 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/dscribe
    copying dscribe/__init__.py -> build/lib.linux-x86_64-3.8/dscribe
    creating build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/descriptor.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/acsf.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/matrixdescriptor.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/soap.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/lmbtr.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/sinematrix.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/coulombmatrix.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/mbtr.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    copying dscribe/descriptors/elementaldistribution.py -> build/lib.linux-x86_64-3.8/dscribe/descriptors
    creating build/lib.linux-x86_64-3.8/dscribe/utils
    copying dscribe/utils/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/utils
    copying dscribe/utils/stats.py -> build/lib.linux-x86_64-3.8/dscribe/utils
    copying dscribe/utils/geometry.py -> build/lib.linux-x86_64-3.8/dscribe/utils
    copying dscribe/utils/species.py -> build/lib.linux-x86_64-3.8/dscribe/utils
    creating build/lib.linux-x86_64-3.8/dscribe/libmbtr
    copying dscribe/libmbtr/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/libmbtr
    creating build/lib.linux-x86_64-3.8/dscribe/kernels
    copying dscribe/kernels/rematchkernel.py -> build/lib.linux-x86_64-3.8/dscribe/kernels
    copying dscribe/kernels/averagekernel.py -> build/lib.linux-x86_64-3.8/dscribe/kernels
    copying dscribe/kernels/localsimilaritykernel.py -> build/lib.linux-x86_64-3.8/dscribe/kernels
    copying dscribe/kernels/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/kernels
    creating build/lib.linux-x86_64-3.8/dscribe/libacsf
    copying dscribe/libacsf/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/libacsf
    creating build/lib.linux-x86_64-3.8/dscribe/core
    copying dscribe/core/lattice.py -> build/lib.linux-x86_64-3.8/dscribe/core
    copying dscribe/core/__init__.py -> build/lib.linux-x86_64-3.8/dscribe/core
    copying dscribe/core/system.py -> build/lib.linux-x86_64-3.8/dscribe/core
    running egg_info
    writing dscribe.egg-info/PKG-INFO
    writing dependency_links to dscribe.egg-info/dependency_links.txt
    writing requirements to dscribe.egg-info/requires.txt
    writing top-level names to dscribe.egg-info/top_level.txt
    reading manifest file 'dscribe.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'dscribe.egg-info/SOURCES.txt'
    creating build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/celllist.cpp -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/celllist.h -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/ext.cpp -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/soapGTO.cpp -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/soapGTO.h -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/soapGeneral.cpp -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/ext/soapGeneral.h -> build/lib.linux-x86_64-3.8/dscribe/ext
    copying dscribe/libmbtr/mbtr.cpp -> build/lib.linux-x86_64-3.8/dscribe/libmbtr
    copying dscribe/libmbtr/mbtr.h -> build/lib.linux-x86_64-3.8/dscribe/libmbtr
    copying dscribe/libmbtr/mbtrwrapper.cpp -> build/lib.linux-x86_64-3.8/dscribe/libmbtr
    copying dscribe/libacsf/acsf.cpp -> build/lib.linux-x86_64-3.8/dscribe/libacsf
    copying dscribe/libacsf/acsf.h -> build/lib.linux-x86_64-3.8/dscribe/libacsf
    copying dscribe/libacsf/acsfwrapper.cpp -> build/lib.linux-x86_64-3.8/dscribe/libacsf
    running build_ext
    building 'dscribe.libacsf.acsfwrapper' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/dscribe
    creating build/temp.linux-x86_64-3.8/dscribe/libacsf
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -Idscribe/libacsf -I/usr/include/python3.8 -c dscribe/libacsf/acsfwrapper.cpp -o build/temp.linux-x86_64-3.8/dscribe/libacsf/acsfwrapper.o -std=c++11 -O3
    dscribe/libacsf/acsfwrapper.cpp: In function ‘int __Pyx_InitCachedConstants()’:
    dscribe/libacsf/acsfwrapper.cpp:3893:74: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
     3893 |   __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dscribe_libacsf_acsfwrapper_pyx, __pyx_n_s_rebuild, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 7, __pyx_L1_error)
    dscribe/libacsf/acsfwrapper.cpp:352:37: note: in definition of macro ‘__Pyx_PyCode_New’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                     ^
    dscribe/libacsf/acsfwrapper.cpp:3893:242: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
     3893 |   __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dscribe_libacsf_acsfwrapper_pyx, __pyx_n_s_rebuild, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 7, __pyx_L1_error)
          |                                                                                                                                                                                                                                                  ^~~~~~~~~~~~~~~~~
          |                                                                                                                                                                                                                                                  |
          |                                                                                                                                                                                                                                                  PyObject* {aka _object*}
    dscribe/libacsf/acsfwrapper.cpp:352:69: note: in definition of macro ‘__Pyx_PyCode_New’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                     ^~~~
    dscribe/libacsf/acsfwrapper.cpp:3893:261: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
     3893 |   __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dscribe_libacsf_acsfwrapper_pyx, __pyx_n_s_rebuild, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 7, __pyx_L1_error)
          |                                                                                                                                                                                                                                                                     ^
          |                                                                                                                                                                                                                                                                     |
          |                                                                                                                                                                                                                                                                     int
    dscribe/libacsf/acsfwrapper.cpp:352:75: note: in definition of macro ‘__Pyx_PyCode_New’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                           ^~~~~
    dscribe/libacsf/acsfwrapper.cpp:352:86: error: too many arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*)’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                                      ^
    dscribe/libacsf/acsfwrapper.cpp:3893:33: note: in expansion of macro ‘__Pyx_PyCode_New’
     3893 |   __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dscribe_libacsf_acsfwrapper_pyx, __pyx_n_s_rebuild, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 7, __pyx_L1_error)
          |                                 ^~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.8/compile.h:5,
                     from /usr/include/python3.8/Python.h:138,
                     from dscribe/libacsf/acsfwrapper.cpp:24:
    /usr/include/python3.8/code.h:122:28: note: declared here
      122 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
          |                            ^~~~~~~~~~
    dscribe/libacsf/acsfwrapper.cpp: In function ‘PyCodeObject* __Pyx_CreateCodeObjectForTraceback(const char*, int, int, const char*)’:
    dscribe/libacsf/acsfwrapper.cpp:5036:9: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
     5036 |         py_funcname,  /*PyObject *name,*/
          |         ^~~~~~~~~~~
          |         |
          |         PyObject* {aka _object*}
    dscribe/libacsf/acsfwrapper.cpp:352:69: note: in definition of macro ‘__Pyx_PyCode_New’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                     ^~~~
    dscribe/libacsf/acsfwrapper.cpp:5037:9: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
     5037 |         py_line,
          |         ^~~~~~~
          |         |
          |         int
    dscribe/libacsf/acsfwrapper.cpp:352:75: note: in definition of macro ‘__Pyx_PyCode_New’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                           ^~~~~
    dscribe/libacsf/acsfwrapper.cpp:352:86: error: too many arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*)’
      352 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
          |                                                                                      ^
    dscribe/libacsf/acsfwrapper.cpp:5023:15: note: in expansion of macro ‘__Pyx_PyCode_New’
     5023 |     py_code = __Pyx_PyCode_New(
          |               ^~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.8/compile.h:5,
                     from /usr/include/python3.8/Python.h:138,
                     from dscribe/libacsf/acsfwrapper.cpp:24:
    /usr/include/python3.8/code.h:122:28: note: declared here
      122 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
          |                            ^~~~~~~~~~
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4iw9lqz5/dscribe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4iw9lqz5/dscribe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-a8omy8ap/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

NaN values in K3 of MBTR when using "angles" as the geometry function

Package versions:

  • ase 3.17.0
  • dscribe 0.2.6
  • Python 3.7.1

Download the XYZ file : https://users.aalto.fi/~ghoshk1/data.xyz

from dscribe.descriptors import MBTR


def make_mbtr_desc(atomic_numbers, max_atomic_number, min_atomic_number,
                 min_distance, decay_factor):
    mbtr_desc = MBTR(
        species=atomic_numbers,
        periodic=False,
        k1={
            "geometry": {
                "function": "atomic_number"
            },
            "grid": {
                "min": min_atomic_number,
                "max": max_atomic_number,
                "sigma": 0.2,
                "n": 200
            }
        },
        k2={
            "geometry": {
                "function": "inverse_distance"
            },
            "grid": {
                "min": 0,
                "max": 1 / min_distance,
                "sigma": 0.02,
                "n": 200,
            },
            "weighting": {
                "function": "exponential",
                "scale": decay_factor,
                "cutoff": 1e-3
            },
        },
        k3={
            "geometry": {
                "function": "angle"
            },
            "grid": {
                "min": -1.0,
                "max": 1.0,
                "sigma": 0.09,
                "n": 200,
            },
            "weighting": {
                "function": "exponential",
                "scale": decay_factor,
                "cutoff": 1e-3
            },
        },
        # flatten = False
    )

    return mbtr_desc

The respective variables in the MBTR definition above were obtained as follows:

import ase.io
from dscribe.utils.stats import system_stats

xyz_file = "./data.xyz"
ase_atoms = list(ase.io.iread(xyz_file, format="xyz"))

# Load in statistics from the dataset
stats = system_stats(ase_atoms)
atomic_numbers = stats["atomic_numbers"]
max_atomic_number = stats["max_atomic_number"]
min_atomic_number = stats["min_atomic_number"]
min_distance = stats["min_distance"]

decay_factor = 0.5

mbtr_desc = make_mbtr_desc(atomic_numbers, max_atomic_number,
                           min_atomic_number, min_distance, decay_factor)

Now create the MBTR for the 26th atom and check for Nan

m = mbtr_desc.create(ase_atoms[25])
np.isnan(m).any()

However, if the K3 in MBTR is definition to use cosine function instead of angle then Nans don't show up

Allowing decompose the SOAP descriptor by atomic species pairs

Hi,

Since SOAP vector is defined as a vector containing elements p(r){Z1,Z2,n,n',l}. I'm wondering is there an easy way to decompose the vector into sub-vectors containing certain (Z1, Z2) combination? Based on the SOAP vector we have now, it seems that the vector is sequenced as: {Z1(Z1, Z2, Z3.....), Z2(Z2, Z3, Z4....), Z3....}, am I understanding this right? If so, how can we make sure which section of the sector corresponds to which pair of elements? Thanks in advance!

error installing dscribe in WSL ubuntu in Win10

I've used dscribe without any problem. When I erased WSL in my labtop ans reinstalled it, I got problem in the install. Following is my error message.
I've check that I have proper version of wheel and can't think of any specific reason why It gives this problem. Any help would be appreciated.
Thanks in advance

--Following is my error message --

Collecting dscribe
Using cached https://files.pythonhosted.org/packages/fe/a5/fe085985e00b93d4a647fe24519bbaba3efe9d7c2e7efd6ef72107e8040f/dscribe-0.2.8.tar.gz
Requirement already satisfied: numpy in ./anaconda3/lib/python3.7/site-packages (from dscribe) (1.16.4)
Requirement already satisfied: scipy in ./anaconda3/lib/python3.7/site-packages (from dscribe) (1.3.0)
Requirement already satisfied: ase in ./.local/lib/python3.7/site-packages (from dscribe) (3.18.0)
Requirement already satisfied: future in ./anaconda3/lib/python3.7/site-packages (from dscribe) (0.17.1)
Requirement already satisfied: scikit-learn in ./anaconda3/lib/python3.7/site-packages (from dscribe) (0.21.2)
Requirement already satisfied: joblib in ./anaconda3/lib/python3.7/site-packages (from dscribe) (0.13.2)
Collecting soaplite==1.0.3 (from dscribe)
Using cached https://files.pythonhosted.org/packages/4a/d2/164ae157724e182ba0b7549f0acfdfbcc87cb707009c52b56353d52750c2/soaplite-1.0.3.tar.gz
Requirement already satisfied: flask in ./anaconda3/lib/python3.7/site-packages (from ase->dscribe) (1.1.1)
Requirement already satisfied: matplotlib in ./anaconda3/lib/python3.7/site-packages (from ase->dscribe) (3.1.0)
Requirement already satisfied: itsdangerous>=0.24 in ./anaconda3/lib/python3.7/site-packages (from flask->ase->dscribe) (1.1.0)
Requirement already satisfied: Jinja2>=2.10.1 in ./anaconda3/lib/python3.7/site-packages (from flask->ase->dscribe) (2.10.1)
Requirement already satisfied: click>=5.1 in ./anaconda3/lib/python3.7/site-packages (from flask->ase->dscribe) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in ./anaconda3/lib/python3.7/site-packages (from flask->ase->dscribe) (0.15.4)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/lib/python3.7/site-packages (from matplotlib->ase->dscribe) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/lib/python3.7/site-packages (from matplotlib->ase->dscribe) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/lib/python3.7/site-packages (from matplotlib->ase->dscribe) (2.4.0)
Requirement already satisfied: python-dateutil>=2.1 in ./anaconda3/lib/python3.7/site-packages (from matplotlib->ase->dscribe) (2.8.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./anaconda3/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask->ase->dscribe) (1.1.1)
Requirement already satisfied: six in ./anaconda3/lib/python3.7/site-packages (from cycler>=0.10->matplotlib->ase->dscribe) (1.12.0)
Requirement already satisfied: setuptools in ./anaconda3/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib->ase->dscribe) (41.1.0)
Building wheels for collected packages: dscribe, soaplite
Building wheel for dscribe (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/jungsdao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vu613yhf/dscribe/setup.py'"'"'; file='"'"'/tmp/pip-install-vu613yhf/dscribe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-e_96ptgc --python-tag cp37
cwd: /tmp/pip-install-vu613yhf/dscribe/
Complete output (60 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/dscribe
copying dscribe/init.py -> build/lib.linux-x86_64-3.7/dscribe
creating build/lib.linux-x86_64-3.7/dscribe/core
copying dscribe/core/init.py -> build/lib.linux-x86_64-3.7/dscribe/core
copying dscribe/core/lattice.py -> build/lib.linux-x86_64-3.7/dscribe/core
copying dscribe/core/system.py -> build/lib.linux-x86_64-3.7/dscribe/core
creating build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/init.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/acsf.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/coulombmatrix.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/descriptor.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/elementaldistribution.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/ewaldsummatrix.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/lmbtr.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/matrixdescriptor.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/mbtr.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/sinematrix.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
copying dscribe/descriptors/soap.py -> build/lib.linux-x86_64-3.7/dscribe/descriptors
creating build/lib.linux-x86_64-3.7/dscribe/kernels
copying dscribe/kernels/init.py -> build/lib.linux-x86_64-3.7/dscribe/kernels
copying dscribe/kernels/average.py -> build/lib.linux-x86_64-3.7/dscribe/kernels
copying dscribe/kernels/localsimilaritykernel.py -> build/lib.linux-x86_64-3.7/dscribe/kernels
copying dscribe/kernels/rematch.py -> build/lib.linux-x86_64-3.7/dscribe/kernels
creating build/lib.linux-x86_64-3.7/dscribe/libacsf
copying dscribe/libacsf/init.py -> build/lib.linux-x86_64-3.7/dscribe/libacsf
creating build/lib.linux-x86_64-3.7/dscribe/libmbtr
copying dscribe/libmbtr/init.py -> build/lib.linux-x86_64-3.7/dscribe/libmbtr
creating build/lib.linux-x86_64-3.7/dscribe/utils
copying dscribe/utils/init.py -> build/lib.linux-x86_64-3.7/dscribe/utils
copying dscribe/utils/geometry.py -> build/lib.linux-x86_64-3.7/dscribe/utils
copying dscribe/utils/species.py -> build/lib.linux-x86_64-3.7/dscribe/utils
copying dscribe/utils/stats.py -> build/lib.linux-x86_64-3.7/dscribe/utils
running egg_info
writing dscribe.egg-info/PKG-INFO
writing dependency_links to dscribe.egg-info/dependency_links.txt
writing requirements to dscribe.egg-info/requires.txt
writing top-level names to dscribe.egg-info/top_level.txt
reading manifest file 'dscribe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.txt'
writing manifest file 'dscribe.egg-info/SOURCES.txt'
copying dscribe/libacsf/acsf.cpp -> build/lib.linux-x86_64-3.7/dscribe/libacsf
copying dscribe/libacsf/acsf.h -> build/lib.linux-x86_64-3.7/dscribe/libacsf
copying dscribe/libacsf/acsfwrapper.cpp -> build/lib.linux-x86_64-3.7/dscribe/libacsf
copying dscribe/libmbtr/mbtr.cpp -> build/lib.linux-x86_64-3.7/dscribe/libmbtr
copying dscribe/libmbtr/mbtr.h -> build/lib.linux-x86_64-3.7/dscribe/libmbtr
copying dscribe/libmbtr/mbtrwrapper.cpp -> build/lib.linux-x86_64-3.7/dscribe/libmbtr
running build_ext
building 'dscribe.libacsf.acsfwrapper' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/dscribe
creating build/temp.linux-x86_64-3.7/dscribe/libacsf
gcc -pthread -B /home/jungsdao/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Idscribe/libacsf -I/home/jungsdao/anaconda3/include/python3.7m -c dscribe/libacsf/acsfwrapper.cpp -o build/temp.linux-x86_64-3.7/dscribe/libacsf/acsfwrapper.o -std=c++11
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for dscribe
Running setup.py clean for dscribe
Building wheel for soaplite (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/jungsdao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"'; file='"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-n11l4nny --python-tag cp37
cwd: /tmp/pip-install-vu613yhf/soaplite/
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/soaplite
copying soaplite/init.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/core.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/genBasis.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/getBasis.py -> build/lib.linux-x86_64-3.7/soaplite
running build_ext
building 'lib.libsoapPySig' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -B /home/jungsdao/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isrc -I/home/jungsdao/anaconda3/include/python3.7m -c src/soapAnalFullPySigma.c -o build/temp.linux-x86_64-3.7/src/soapAnalFullPySigma.o -O3 -std=c99
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for soaplite
Running setup.py clean for soaplite
Failed to build dscribe soaplite
Installing collected packages: soaplite, dscribe
Running setup.py install for soaplite ... error
ERROR: Command errored out with exit status 1:
command: /home/jungsdao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"'; file='"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-xobg36k8/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-vu613yhf/soaplite/
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/soaplite
copying soaplite/init.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/core.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/genBasis.py -> build/lib.linux-x86_64-3.7/soaplite
copying soaplite/getBasis.py -> build/lib.linux-x86_64-3.7/soaplite
running build_ext
building 'lib.libsoapPySig' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -B /home/jungsdao/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isrc -I/home/jungsdao/anaconda3/include/python3.7m -c src/soapAnalFullPySigma.c -o build/temp.linux-x86_64-3.7/src/soapAnalFullPySigma.o -O3 -std=c99
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/jungsdao/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"'; file='"'"'/tmp/pip-install-vu613yhf/soaplite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-xobg36k8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Batch creation

Currently the library provides the batch_create-function for handling large datasets. I think it would be clearer for users if this functionality would be directly available in the create-method of the descriptor objects. This would however require that all the arguments taken by the create-function will need to be able to handle multiple values (one per structure). Needs some testing to see if this idea is worth the effort.

Can I set nmax and lmax larger?

I am using SOAP to describe the local atomic environment of amorphous materials. However, I notice that there is a limit for number of basis functions and lmax (nmax cannot exceed 12 and lmax cannot exceed 9).

I was wondering if I could set a larger value for nmax and lmax. That could help me to describe the local environment better.

MBTR Normalisation Details

Hi @lauri-codes,

As mentioned in #27, I'd be very interested in learning a bit more about how the MBTR normalisation works under the hood, and how you manage to reduce double-counting in case of supercells, and how all of this relates to normalisation. Wouldn't removing symmetrically identical pairs/triplets already ensure identical MBTRs, regardless of normalisation?

Cheers,

Marcel

Value Error with small n_atoms_max in matrix descriptor

Hello,
I encountered an issue related to matrixdescriptor class.

Summary

In short, ValueError: index can't contain negative values occurs when n_atoms_max is smaller than the input structure.

This error comes from this line (matrixdescriptor.py#L192):
padded = np.pad(array, [(0, self.n_atoms_max-n_atoms)]*n_dim, 'constant')

I guess we have two options to address this issue:

  1. Adding an assertion or warning to ensure n_atoms <= n_atoms_max
  2. Automatically choosing n_atoms_max depending on the input structure:
    matminer does this in their implementation of Sine Coulomb Matrix

Do you have any ideas about this issue?

To reproduce

from ase.build import bulk
from dscribe.descriptors import EwaldSumMatrix, SineMatrix

esm = EwaldSumMatrix(n_atoms_max=1, flatten=False)
# NaCl crystal created as an ASE.Atoms
nacl = bulk("NaCl", "rocksalt", a=5.64)

esm.create(nacl, n_jobs=1)

# We get the same error with Sine Matrix as well
# scm = SineMatrix(n_atoms_max=1)
# scm.create(nacl)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-3b115864245f> in <module>
----> 1 esm.create(nacl, n_jobs=1)

/opt/conda/lib/python3.7/site-packages/dscribe/descriptors/ewaldsummatrix.py in create(self, system, accuracy, w, rcut, gcut, a, n_jobs, verbose)
    106         # If single system given, skip the parallelization
    107         if isinstance(system, (Atoms, System)):
--> 108             return self.create_single(system, accuracy, w, rcut, gcut, a)
    109         else:
    110             self._check_system_list(system)

/opt/conda/lib/python3.7/site-packages/dscribe/descriptors/ewaldsummatrix.py in create_single(self, system, accuracy, w, rcut, gcut, a)
    187         self.rcut = rcut
    188 
--> 189         matrix = super().create_single(system)
    190         return matrix
    191 

/opt/conda/lib/python3.7/site-packages/dscribe/descriptors/matrixdescriptor.py in create_single(self, system)
    126 
    127         # Add zero padding
--> 128         matrix = self.zero_pad(matrix)
    129 
    130         # Flatten

/opt/conda/lib/python3.7/site-packages/dscribe/descriptors/matrixdescriptor.py in zero_pad(self, array)
    190         n_atoms = array.shape[0]
    191         n_dim = array.ndim
--> 192         padded = np.pad(array, [(0, self.n_atoms_max-n_atoms)]*n_dim, 'constant')
    193 
    194         return padded

<__array_function__ internals> in pad(*args, **kwargs)

/opt/conda/lib/python3.7/site-packages/numpy/lib/arraypad.py in pad(array, pad_width, mode, **kwargs)
    746 
    747     # Broadcast to shape (array.ndim, 2)
--> 748     pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
    749 
    750     if callable(mode):

/opt/conda/lib/python3.7/site-packages/numpy/lib/arraypad.py in _as_pairs(x, ndim, as_index)
    517 
    518     if as_index and x.min() < 0:
--> 519         raise ValueError("index can't contain negative values")
    520 
    521     # Converting the array with `tolist` seems to improve performance

ValueError: index can't contain negative values

ACSF descriptor structure

Hi,

great code!

I'm currently developing an interface to use dscribe with cmlkit.

I have a question regarding the ACSF implementation: What exactly is the structure of the resulting descriptor? In my tests, when I specify only one symmetry function with one species, I regardless get two entries per atom in the result. Shouldn't that be just one?

Cheers!

OQMD database

Hi,

I am trying to reproduce the result for the formation energy prediction on the OQMD data. Could I know the way you guys query the OQMD database to get 222215 data points?

When I do the first filtering to get the converged samples with,

FormE = FormationEnergy.objects.filter(calculation__converged=True) print(FormE.count())

I get 309107 samples instead of 239426 as indicated in the paper. Am I doing something wrong here? Thanks!

Modifications for LMBTR for Element Encoding

Hi there!

I was wondering if there was anyway to encode elemental identity in LMBTR. I understand that the traditional MBTR doesn't exactly work, but is there a way the user could prescribe a custom distance metric that is compatible with the system at hand?

Thanks!

formula for SOAP power spectrum in the tutorial.

Hi,

In the tutorial the power spectrum as well as the expansion coefficients depend on r, however the r dependency should be integrated out. So the r dependency in p(r) and c^Z_nlm(r) should be dropped, shouldn't it?

Allow insertion of atomic species by symbol

Currently all descriptors expect the atomic species to be represented by the atomic number. It would be nice to also have the possibility of inserting the species by atomic elements, as in ASE with "symbols" parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.