BingqingCheng/ASAP

Problems with installing ASAP

gelzinyte opened this issue · 6 comments

Hi Guys!

I'm trying to re-install ASAP with python3 setup.py install in my conda environment. However, this gives an error, the end of which reads


Installed /home/eg475/programs/miniconda3/envs/general/lib/python3.8/site-packages/asaplib-0.0.1-py3.8.egg
Processing dependencies for asaplib==0.0.1
Searching for dscribe>=0.4.0
Reading https://pypi.org/simple/dscribe/
Downloading https://files.pythonhosted.org/packages/70/c5/4238f07cea20961d1f9e154ce3e3dc5b8cf35ea17541b6979d78b4a77a14/dscribe-0.4.0.tar.gz#sha256=59d7ecf66322482400664916dffac69a9b8fd77ffccf41a80ea35d8cbdc0ca21
Best match: dscribe 0.4.0
Processing dscribe-0.4.0.tar.gz
Writing /tmp/easy_install-4g0erj5y/dscribe-0.4.0/setup.cfg
Running dscribe-0.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-4g0erj5y/dscribe-0.4.0/egg-dist-tmp-udjr8f4d
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'
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: error: unrecognised command line option ‘-std=c++11’
error: Setup script exited with error: command 'gcc' failed with exit status 1

In case that's relevant, before starting this installation from a fresh git clone I've removed asaplib and ASAP2 found by pip. I assume that should have removed everything?

Any suggestions about the installation?

Thanks!
Elena

Hi Elena,

The warnings come from the Dscribe side. My guess is that they change the name of directories so something but haven't fully updated the Makefiles. I think it doesn't matter, as long as all the commands of asap work. Do the asap commands work?

Hi Bingqing,

The commands do work and I am able to use asap via command line. However, I'd like to use the asaplib and I'm running into problems following the tutorial. Let me know if rather than continuing this thread I should move this to a new issue!

The first error is TypeError: compute_global_descriptors() got an unexpected keyword argument 'n_process'. My datasets are small enough so I don't care about this now, but I thought I'd point it out.

After removing 'n_process' from asapxyz.compute_global_descriptors I get a ValueError: System doesn't have cell to justify periodicity.. It looks from the source code that I have to add 'periodic':False when specifying soap_spec, but I get the same error.

Finally, if I set a dummy periodic cell, I run into ValueError: need at least one array to concatenate at dm = asapxyz.fetch_computed_descriptors(['avgsoap']), which seems to be due to sbs being set to empty when global descriptors are computed. I'm not sure what else I can do about it.

Thanks!
Elena

Hi,

actually everything works on my laptop. The notebook you can find at https://github.com/BingqingCheng/Mapping-the-space-of-materials-and-molecules (in the TiO2 folder)

Have you installed the latest version of ASAP?

Hi!

I have freshly installed it on my laptop and your notebook works. I thought I had the latest version on the cluster too, but probably I haven't updated it properly. It also looks like problems with dscribe was that I didn't have it :)

The periodicity problem still remains, though: I still get ValueError: System doesn't have cell to justify periodicity with 'periodic':False in soap_spec:

soap_spec = {'soap1': {'type': 'SOAP',
                       'cutoff': 4.0,
                       'n': 6,
                       'l': 6,
                       'atom_gaussian_width': 0.5,
                       'crossover': False,
                       'rbf': 'gto',
                       'periodic':False
                      }
            }

Or should I specify non-periodicity somehow differently? It does work if I set a large dummy cell, though, and via the command line.

To help me understand, the example is on a periodic system, so are you using it on a non-periodic one?

If so, when you initialize the xyz, you can do somethiong like asapxyz = ASAPXYZ(fxyz=something, periodic=False)

Yup, I had a bunch of non-periodic molecules. Your suggestion was it, thanks a lot!!