Code Monkey home page Code Monkey logo

python-ace's People

Contributors

mttrin93 avatar srmnitc avatar yury-lysogorskiy avatar yuzie007 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

Watchers

 avatar  avatar  avatar  avatar

python-ace's Issues

fitting with GPU

For fitting the model with Tensorflow with GPU

I got this error

2023-02-16 14:32:53.327564: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory

in order to solve it
I follow
https://www.tensorflow.org/install/pip#install_cuda_with_apt

Hope it helps

Error installing pyace

Hi, I followed the installation procedure for ACE and with python 3.8, Cmake 3.22.4, TensorFlow 2.5, and after the installation of Tensorpotential during the installation of python-ace using pip install --upgrade . I get the following error I would appreciate your comment on the problem.

Building wheels for collected packages: pyace
  Building wheel for pyace (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /sw/eb/sw/Anaconda3/2021.05/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-2wumzvxw/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-2wumzvxw/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-1funyjpu
       cwd: /tmp/pip-req-build-2wumzvxw/
  Complete output (158 lines):
  running bdist_wheel
  running build
  running build_py
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/radial.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/asecalc.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/atomicenvironment.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/generalfit.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/lossfuncspec.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/pyneighbor.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/__init__.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/validate.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/paralleldataexecutor.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/preparedata.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/read_base_conf.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/metrics_aggregator.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/_version.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/fitadapter.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/multispecies_basisextension.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/const.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/pyacefit.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/basisextension.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/helpers.py -> build/lib.linux-x86_64-3.8/pyace
  copying src/pyace/fitcallbacks.py -> build/lib.linux-x86_64-3.8/pyace
  creating build/lib.linux-x86_64-3.8/pyace/ace
  copying src/pyace/ace/__init__.py -> build/lib.linux-x86_64-3.8/pyace/ace
  creating build/lib.linux-x86_64-3.8/pyace/utils
  copying src/pyace/utils/__init__.py -> build/lib.linux-x86_64-3.8/pyace/utils
  copying src/pyace/utils/timing.py -> build/lib.linux-x86_64-3.8/pyace/utils
  creating build/lib.linux-x86_64-3.8/pyace/data
  copying src/pyace/data/__init__.py -> build/lib.linux-x86_64-3.8/pyace/data
  copying src/pyace/data/mus_ns_uni_to_rawlsLS_np_rank.pckl -> build/lib.linux-x86_64-3.8/pyace/data
  copying src/pyace/data/input_template.yaml -> build/lib.linux-x86_64-3.8/pyace/data
  UPDATING build/lib.linux-x86_64-3.8/pyace/_version.py
  set build/lib.linux-x86_64-3.8/pyace/_version.py to '0.2.7+36.gbfc87d7'
  running build_ext
  Compilation configuration:  Release
  -- The C compiler identification is GNU 4.8.5
  -- The CXX compiler identification is GNU 4.8.5
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/gcc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/g++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found PythonInterp: /sw/eb/sw/Anaconda3/2021.05/bin/python (found version "3.8.8")
  -- Found PythonLibs: /sw/eb/sw/Anaconda3/2021.05/lib/libpython3.8.so
  -- pybind11 v2.3.dev0
  EVALUATOR_PATH=/tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator
  EVALUATOR_PATH=/tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- LTO enabled
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-req-build-2wumzvxw/build/temp.linux-x86_64-3.8
  Building arguments:  -- -j sharmonics
  [ 33%] Building CXX object CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o
  [ 66%] Building CXX object CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_couplings.cpp.o
  [ 66%] Building CXX object CMakeFiles/sharmonics.dir/src/pyace/ace/ace_spherical_polar_binding.cpp.o
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:6,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = double]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from ‘const char [6]’ to non-scalar type ‘std::string {aka std::basic_string<char>}’ requested
       ContiguousArrayND() = default;
       ^
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor ‘Array2DLM<T>::Array2DLM() [with T = double]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = double]’ first required here
       Array2DLM() = default;
       ^
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor ‘ACESHarmonics::ACESHarmonics(LS_TYPE)’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method ‘Array2DLM<T>::Array2DLM() [with T = double]’ first required here
   ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
                                          ^
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:6,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = ACEComplex]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from ‘const char [6]’ to non-scalar type ‘std::string {aka std::basic_string<char>}’ requested
       ContiguousArrayND() = default;
       ^
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor ‘Array2DLM<T>::Array2DLM() [with T = ACEComplex]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = ACEComplex]’ first required here
       Array2DLM() = default;
       ^
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor ‘ACESHarmonics::ACESHarmonics(LS_TYPE)’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method ‘Array2DLM<T>::Array2DLM() [with T = ACEComplex]’ first required here
   ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
                                          ^
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:6,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = ACEDYcomponent]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from ‘const char [6]’ to non-scalar type ‘std::string {aka std::basic_string<char>}’ requested
       ContiguousArrayND() = default;
       ^
  In file included from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
                   from /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor ‘Array2DLM<T>::Array2DLM() [with T = ACEDYcomponent]’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method ‘ContiguousArrayND<T>::ContiguousArrayND() [with T = ACEDYcomponent]’ first required here
       Array2DLM() = default;
       ^
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor ‘ACESHarmonics::ACESHarmonics(LS_TYPE)’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method ‘Array2DLM<T>::Array2DLM() [with T = ACEDYcomponent]’ first required here
   ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
                                          ^
  gmake[3]: *** [CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o] Error 1
  gmake[3]: *** Waiting for unfinished jobs....
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_couplings.cpp: In function ‘int generate_basis_function_n_body(RANK_TYPE, const NS_TYPE*, const LS_TYPE*, const LS_TYPE*, ACEBBasisFunction&, const ACEClebschGordan&, bool)’:
  /tmp/pip-req-build-2wumzvxw/lib/ace/src/fitting/ace_couplings.cpp:370:52: warning: non-constant array size in new, unable to verify length of initializer-list [enabled by default]
       b_basis_function.mus = new SPECIES_TYPE[rank]{0};
                                                      ^
  gmake[2]: *** [CMakeFiles/sharmonics.dir/all] Error 2
  gmake[1]: *** [CMakeFiles/sharmonics.dir/rule] Error 2
  gmake: *** [sharmonics] Error 2
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-2wumzvxw/setup.py", line 109, in <module>
      setup(
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-2wumzvxw/versioneer.py", line 1791, in run
      _build_ext.run(self)
    File "/tmp/pip-req-build-2wumzvxw/setup.py", line 39, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-2wumzvxw/setup.py", line 86, in build_extension
      subprocess.check_call(['cmake', '--build', '.'] + build_args,
    File "/sw/eb/sw/Anaconda3/2021.05/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--', '-j', 'sharmonics']' returned non-zero exit status 2.
  ----------------------------------------

Magnetization and charge transfer

Hello,

I was wondering if there is any plan to include properties like magnetization or charge transfer based on the paper

"Atomic cluster expansion of scalar, vectorial, and tensorial properties including magnetism and charge transfer"

in near future, to the current ACE code.

Thanks,
Siamak

Issues when running LAMMPS with ACE

Hi authors, do you have any ideas about this issue when running LAMMPS with ACE?

LAMMPS (23 Jun 2022 - Update 3)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
triclinic box = (0 0 0) to (328.73874 46.989717 81.388576) with tilt (0 0 -1.82e-08)
32 by 4 by 5 MPI processor grid
reading atoms ...
119328 atoms
read_data CPU = 0.506 seconds
ACE version: 2021.10.25
Recursive evaluator is used
Loading ./aln_gb_ver4.yace
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
terminate called after throwing an instance of 'std::out_of_range'

Suggestions for interfacing with RMC

Hi, My experimental colleagues and I were discussing using my MLIPs to add physical guidance to their XPDF reverse Monte Carlo fitting procedure. They currently use powerful GPU nodes to perform ~ 10**6 structure trials with 10,000 to 30,000 atoms. Can I use the tensorpotential backend to quickly evaluate my MLIPs on a GPU? Or should I focus on using LAMMPS for large-scale CPU parallelism?

This might seem like a silly question from someone that's been using PACEMAKER for almost a year, but the ASE calculator has been fast enough for my purposes until now.

computing Basis functions

Can we use pacemaker to compute Basis functions B_iv and A_iv for each atom in an atomic configuration?

Example notebooks missing

Hi,

In the documentation of the pacemaker there is a mention of "Notebook" folder which should contain some examples in ipython format, but I can't find it. Has it not been released yet?
I'm looking for:
notebooks/data_custom_weights.ipynb

Just wondering whether it is possible to add different weights to individual atoms, or adding weights to specific atom types.

Thanks,
Siamak

Error after: INFO - Structure dataset: multiple unique compositions found, trying to construct convex hull

Hi,

I am training a potential for a 4 component system. I have used the same data to fit another potential (MTP) which worked fine, so I know that the data are fine. I'm getting the following error when fitting with pacemaker. (I put the whole report, but made the part that the error starts in bold font).

Any idea what may cause this?

Thanks,
Siamak

2022-05-03 23:16:17,116 - root - INFO - Redirecting log into file log.txt
2022-05-03 23:16:17,124 - root - INFO - Start pacemaker
2022-05-03 23:16:17,125 - root - INFO - pacemaker/pyace version: 0.2.7
2022-05-03 23:16:17,126 - root - INFO - ace_evaluator version: 2021.10.25
2022-05-03 23:16:17,127 - root - INFO - Loading input.yaml...
2022-05-03 23:16:17,193 - pyace.generalfit - INFO - Set numpy random seed to 42
2022-05-03 23:16:17,615 - pyace.generalfit - INFO - Target potential shape constructed from dictionary, it contains 5552
functions
2022-05-03 23:18:21,798 - pyace.generalfit - INFO - tensorpot_version: 0.2.0+19.gfa5b8b0
2022-05-03 23:18:21,819 - pyace.generalfit - INFO - User name automatically identified: sattarian
2022-05-03 23:18:21,824 - pyace.preparedata - INFO - Search for cache ref-file: fourthtrain.pckl.gzip
2022-05-03 23:18:21,828 - pyace.preparedata - INFO - fourthtrain.pckl.gzip found, try to load
2022-05-03 23:18:21,831 - pyace.preparedata - INFO - Loading dataframe from pickle file fourthtrain.pckl.gzip (3.2MiB)
2022-05-03 23:18:22,232 - pyace.preparedata - INFO - Transforming to DataFrameWithMetadata
2022-05-03 23:18:22,235 - pyace.preparedata - INFO - Setting up structures dataframe - please be patient...
2022-05-03 23:18:22,335 - pyace.preparedata - INFO - Processing structures dataframe. Shape: (846, 5)
2022-05-03 23:18:22,339 - pyace.preparedata - INFO - Total number of atoms: 90472
2022-05-03 23:18:22,342 - pyace.preparedata - INFO - Mean number of atoms per structure: 106.9
2022-05-03 23:18:22,346 - pyace.preparedata - INFO - 'energy' columns found
2022-05-03 23:18:22,349 - pyace.preparedata - INFO - 'forces' columns found
2022-05-03 23:18:22,352 - pyace.preparedata - INFO - 'pbc' columns extraction from 'ase_atoms'
2022-05-03 23:18:22,366 - pyace.preparedata - INFO - 'cell' column found
2022-05-03 23:18:22,370 - pyace.preparedata - INFO - 'energy_corrected' column found
2022-05-03 23:18:22,377 - pyace.preparedata - INFO - 'energy_corrected_per_atom' column extraction
2022-05-03 23:18:22,382 - pyace.preparedata - INFO - Min energy per atom: -5.352 eV/atom
2022-05-03 23:18:22,385 - pyace.preparedata - INFO - Max energy per atom: -4.305 eV/atom
2022-05-03 23:18:22,389 - pyace.preparedata - INFO - Min abs energy per atom: 4.305 eV/atom
2022-05-03 23:18:22,393 - pyace.preparedata - INFO - Max abs energy per atom: 5.352 eV/atom
2022-05-03 23:18:22,396 - pyace.preparedata - INFO - ASE atoms ('ase_atoms' column) are already in dataframe
2022-05-03 23:18:22,399 - pyace.preparedata - INFO - Attaching SinglePointCalculator to ASE atoms...
2022-05-03 23:18:22,778 - pyace.preparedata - INFO - Attaching SinglePointCalcualtor to ASE atoms...done within 0.375462
sec (0.00415004 ms/at)
2022-05-03 23:18:22,781 - pyace.preparedata - INFO - Atomic environment representation construction...
2022-05-03 23:18:22,785 - pyace.preparedata - INFO - Building 'tp_atoms' (dataset size 846, cutoff=10.0A)...
2022-05-03 23:18:30,433 - pyace.preparedata - INFO - Dataframe size after transform: 846
2022-05-03 23:18:30,438 - pyace.preparedata - INFO - Atomic environment representation construction...done within 7.6532
sec (0.0846 ms/atom)
2022-05-03 23:18:30,443 - pyace.preparedata - INFO - Saving processed raw dataframe into fourthtrain.pckl.gzip
2022-05-03 23:18:30,446 - pyace.preparedata - INFO - Writing fit pickle file: /home/sattarian/ACE/training/train22/fourt
htrain.pckl.gzip
2022-05-03 23:20:44,308 - pyace.preparedata - INFO - Saved to file /home/sattarian/ACE/training/train22/fourthtrain.pckl
.gzip (39.4MiB)
2022-05-03 23:20:44,323 - pyace.preparedata - INFO - Apply weights policy: EnergyBasedWeightingPolicy(nfit=10000, energy
=convex_hull, DElow=1.0, DEup=10.0, DFup=50.0, DE=1.0, DF=1.0, wlow=0.75, reftype=all,seed=42)
2022-05-03 23:20:44,326 - pyace.preparedata - INFO - Keeping bulk and cluster data
2022-05-03 23:20:44,329 - pyace.preparedata - INFO - No cutoff for EnergyBasedWeightingPolicy is provided, no structures
outside cutoff that will now be removed
2022-05-03 23:20:44,332 - pyace.preparedata - INFO - EnergyBasedWeightingPolicy: energy reference frame - convex hull di
stance (if possible)
2022-05-03 23:20:44,405 - pyace.preparedata - WARNING - No pure element energy for Be is available, assuming 0 eV/atom
2022-05-03 23:20:44,409 - pyace.preparedata - WARNING - No pure element energy for Cr is available, assuming 0 eV/atom
2022-05-03 23:20:44,416 - pyace.preparedata - WARNING - No pure element energy for F is available, assuming 0 eV/atom
2022-05-03 23:20:44,423 - pyace.preparedata - WARNING - No pure element energy for Li is available, assuming 0 eV/atom
2022-05-03 23:20:44,428 - pyace.preparedata - INFO - Structure dataset: multiple unique compositions found, trying to co
nstruct convex hull

Traceback (most recent call last):
File "/mnt/cephfs/software/sattarian/anaconda3/envs/ACE/bin/pacemaker", line 332, in
main(sys.argv[1:])
File "/mnt/cephfs/software/sattarian/anaconda3/envs/ACE/bin/pacemaker", line 269, in main
general_fit = GeneralACEFit(potential_config=potential_config, fit_config=fit_config, data_config=data_config,
File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/generalfit.py", line 303, in init
self.fitting_data = get_fitting_dataset(evaluator_name=self.evaluator_name,
File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/preparedata.py", line 1132, in get_fitt
ing_dataset
df = spec.get_fit_dataframe(force_query=force_query, ignore_weights=force_weighting)
File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/preparedata.py", line 636, in get_fit_d
ataframe
self.df = self.weights_policy.generate_weights(self.df)
File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/preparedata.py", line 731, in generate_
weights
compute_convexhull_dist(df) # generate "e_chull_dist_per_atom" column
File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/preparedata.py", line 924, in compute_c
onvexhull_dist
hull = ConvexHull(chull_values)
File "_qhull.pyx", line 2436, in scipy.spatial._qhull.ConvexHull.init
File "_qhull.pyx", line 357, in scipy.spatial._qhull._Qhull.init
scipy.spatial._qhull.QhullError: QH6154 Qhull precision error: Initial simplex is flat (facet 1 is coplanar with the int
erior point)

While executing: | qhull i Qt
Options selected for Qhull 2019.1.r 2019/06/21:
run-id 706984386 incidence Qtriangulate _pre-merge _zero-centrum
_max-width 1 Error-roundoff 6.7e-15 _one-merge 6e-14 _near-inside 3e-13
Visible-distance 4e-14 U-max-coplanar 4e-14 Width-outside 8e-14
_wide-facet 2.4e-13 _maxoutside 8e-14

precision problems (corrected unless 'Q0' or an error)
5 degenerate hyperplanes recomputed with gaussian elimination
5 nearly singular or axis-parallel hyperplanes
5 zero divisors during back substitute
852 zero divisors during gaussian elimination

The input to qhull appears to be less than 4 dimensional, or a
computation has overflowed.

Qhull could not construct a clearly convex simplex from points:

  • p598(v5): 0.13 0.027 0.59 -4.3
  • p661(v4): 0.13 0.027 0.59 -5.4
  • p100(v3): 0.13 0.019 0.58 -5.2
  • p0(v2): 0.14 0.0098 0.58 -5.2
  • p200(v1): 0.13 0.027 0.59 -5.3

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet. The maximum round off error for
computing distances is 6.7e-15. The center point, facets and distances
to the center point are as follows:

center point 0.1302 0.0221 0.5872 -5.057

facet p661 p100 p0 p200 distance= -3.5e-18
facet p598 p100 p0 p200 distance= -3.5e-18
facet p598 p661 p0 p200 distance= -3.5e-18
facet p598 p661 p100 p200 distance= -3.5e-18
facet p598 p661 p100 p0 distance= -3.5e-18

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates. Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
0: 0.1273 0.1373 difference= 0.009982
1: 0.009804 0.02727 difference= 0.01747
2: 0.5784 0.5909 difference= 0.01248
3: -5.352 -2.225e-308 difference= 5.352

If the input should be full dimensional, you have several options that
may determine an initial simplex:

  • use 'QJ' to joggle the input and make it full dimensional
  • use 'QbB' to scale the points to the unit cube
  • use 'QR0' to randomly rotate the input for different maximum points
  • use 'Qs' to search all points for the initial simplex
  • use 'En' to specify a maximum roundoff error less than 6.7e-15.
  • trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:

  • use 'QJ' to joggle the input and make it full dimensional
  • use 'Qbk:0Bk:0' to delete coordinate k from the input. You should
    pick the coordinate with the least range. The hull will have the
    correct topology.
  • determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  • add one or more points to make the input full dimensional.

Installation problem

Dear developers,

I've meet a problem when installing python-ace, I followed the instruction, Tensorflow and TensorPotential are successfully installed.
Here is the error log when using pip install:

Building wheels for collected packages: pyace
Building wheel for pyace (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [112 lines of output]
running bdist_wheel
running build
running build_py
UPDATING build/lib.linux-x86_64-cpython-38/pyace/_version.py
set build/lib.linux-x86_64-cpython-38/pyace/_version.py to '0.2.7+53.g287f728'
running build_ext
Compilation configuration: Release
-- pybind11 v2.3.dev0
EVALUATOR_PATH=/nethome/he000026/software/python-ace/lib/ace/ace-evaluator
EVALUATOR_PATH=/nethome/he000026/software/python-ace/lib/ace/ace-evaluator
-- Configuring done
-- Generating done
-- Build files have been written to: /nethome/he000026/software/python-ace/build/temp.linux-x86_64-cpython-38
Building arguments: -- -j sharmonics
[ 33%] Building CXX object CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = double]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = double]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = double]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = double]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = ACEComplex]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = ACEComplex]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = ACEComplex]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = ACEComplex]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = ACEDYcomponent]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = ACEDYcomponent]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = ACEDYcomponent]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = ACEDYcomponent]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
gmake[3]: *** [CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/sharmonics.dir/all] Error 2
gmake[1]: *** [CMakeFiles/sharmonics.dir/rule] Error 2
gmake: *** [sharmonics] Error 2
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/nethome/he000026/software/python-ace/setup.py", line 110, in
setup(
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/python-ace/versioneer.py", line 1791, in run
_build_ext.run(self)
File "/nethome/he000026/software/python-ace/setup.py", line 39, in run
self.build_extension(ext)
File "/nethome/he000026/software/python-ace/setup.py", line 86, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args,
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--', '-j', 'sharmonics']' returned non-zero exit status 2.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyace
Running setup.py clean for pyace
Failed to build pyace
Installing collected packages: pyace
Running setup.py install for pyace ... error
error: subprocess-exited-with-error

× Running setup.py install for pyace did not run successfully.
│ exit code: 1
╰─> [174 lines of output]
running install
/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/init.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/_version.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/asecalc.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/atomicenvironment.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/basisextension.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/const.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/fitadapter.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/fitcallbacks.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/generalfit.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/helpers.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/lossfuncspec.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/metrics_aggregator.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/multispecies_basisextension.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/paralleldataexecutor.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/preparedata.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/pyacefit.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/pyneighbor.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/radial.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/read_base_conf.py -> build/lib.linux-x86_64-cpython-38/pyace
copying src/pyace/validate.py -> build/lib.linux-x86_64-cpython-38/pyace
creating build/lib.linux-x86_64-cpython-38/pyace/ace
copying src/pyace/ace/init.py -> build/lib.linux-x86_64-cpython-38/pyace/ace
creating build/lib.linux-x86_64-cpython-38/pyace/data
copying src/pyace/data/init.py -> build/lib.linux-x86_64-cpython-38/pyace/data
creating build/lib.linux-x86_64-cpython-38/pyace/utils
copying src/pyace/utils/init.py -> build/lib.linux-x86_64-cpython-38/pyace/utils
copying src/pyace/utils/timing.py -> build/lib.linux-x86_64-cpython-38/pyace/utils
copying src/pyace/data/mus_ns_uni_to_rawlsLS_np_rank.pckl -> build/lib.linux-x86_64-cpython-38/pyace/data
copying src/pyace/data/input_template.yaml -> build/lib.linux-x86_64-cpython-38/pyace/data
UPDATING build/lib.linux-x86_64-cpython-38/pyace/_version.py
set build/lib.linux-x86_64-cpython-38/pyace/_version.py to '0.2.7+53.g287f728'
running build_ext
Compilation configuration: Release
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /nethome/he000026/software/miniconda3/envs/pyiron/bin/python (found version "3.8.13")
-- Found PythonLibs: /nethome/he000026/software/miniconda3/envs/pyiron/lib/libpython3.8.so
-- pybind11 v2.3.dev0
EVALUATOR_PATH=/nethome/he000026/software/python-ace/lib/ace/ace-evaluator
EVALUATOR_PATH=/nethome/he000026/software/python-ace/lib/ace/ace-evaluator
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /nethome/he000026/software/python-ace/build/temp.linux-x86_64-cpython-38
Building arguments: -- -j sharmonics
Scanning dependencies of target sharmonics
[ 33%] Building CXX object CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o
[ 66%] Building CXX object CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_couplings.cpp.o
[ 66%] Building CXX object CMakeFiles/sharmonics.dir/src/pyace/ace/ace_spherical_polar_binding.cpp.o
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = double]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = double]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = double]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = double]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = ACEComplex]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = ACEComplex]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = ACEComplex]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = ACEComplex]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
In file included from /nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_arraynd.h:38:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:6,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h: In constructor 'ContiguousArrayND::ContiguousArrayND() [with T = ACEDYcomponent]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_contigous_array.h:57:5: error: conversion from 'const char [6]' to non-scalar type 'std::string {aka std::basic_string}' requested
ContiguousArrayND() = default;
^
In file included from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.h:7:0,
from /nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:4:
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h: In constructor 'Array2DLM::Array2DLM() [with T = ACEDYcomponent]':
/nethome/he000026/software/python-ace/lib/ace/ace-evaluator/src/ace_array2dlm.h:64:5: note: synthesized method 'ContiguousArrayND::ContiguousArrayND() [with T = ACEDYcomponent]' first required here
Array2DLM() = default;
^
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp: In constructor 'ACESHarmonics::ACESHarmonics(LS_TYPE)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_spherical_polar.cpp:15:40: note: synthesized method 'Array2DLM::Array2DLM() [with T = ACEDYcomponent]' first required here
ACESHarmonics::ACESHarmonics(LS_TYPE lm) {
^
gmake[3]: *** [CMakeFiles/sharmonics.dir/lib/ace/src/fitting/ace_spherical_polar.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_couplings.cpp: In function 'int generate_basis_function_n_body(RANK_TYPE, const NS_TYPE*, const LS_TYPE*, const LS_TYPE*, ACEBBasisFunction&, const ACEClebschGordan&, bool)':
/nethome/he000026/software/python-ace/lib/ace/src/fitting/ace_couplings.cpp:370:52: warning: non-constant array size in new, unable to verify length of initializer-list [enabled by default]
b_basis_function.mus = new SPECIES_TYPE[rank]{0};
^
gmake[2]: *** [CMakeFiles/sharmonics.dir/all] Error 2
gmake[1]: *** [CMakeFiles/sharmonics.dir/rule] Error 2
gmake: *** [sharmonics] Error 2
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/nethome/he000026/software/python-ace/setup.py", line 110, in
setup(
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/command/install.py", line 698, in run
self.run_command('build')
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/nethome/he000026/software/python-ace/versioneer.py", line 1791, in run
_build_ext.run(self)
File "/nethome/he000026/software/python-ace/setup.py", line 39, in run
self.build_extension(ext)
File "/nethome/he000026/software/python-ace/setup.py", line 86, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args,
File "/nethome/he000026/software/miniconda3/envs/pyiron/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--', '-j', 'sharmonics']' returned non-zero exit status 2.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyace

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Could you please have a look?

Best,
Jian

pace_select --memory-limit does not work properly

I'm not sure if I understand properly how it should work, but my understanding is that by providing the --memory-limit pace_select should select an optimal batch size such that everything fits into the provided memory limit.

However it looks like pace_select allocates at least least twice the amount for example for --memory-limit=30GB top shows

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                          
  90312 ondracka  20   0   61.4g  60.5g  27012 R 377.9   6.0  62:54.37 pace_select 

How can the L-BFGS-B history be increased?

Hi, When using pacemaker with BFGS, the fully dense hessian seems to be making fitting iterations take ~3x longer than If I use L-BFGS-B. It looks like the powerful GPUs we have are waiting on the CPUs to solve the update step with BFGS. However, L-BFGS-B has much slower convergence with respect to number of iterations. I suspect the poor convergence is due to the L-BGFS-B memory length being only 10 iterations be default (m=10 in the second link).

Is there a way I can pass a longer history parameter to the optimizer?

https://docs.scipy.org/doc/scipy/reference/optimize.minimize-lbfgsb.html

https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_l_bfgs_b.html#scipy.optimize.fmin_l_bfgs_b

AssertionError: Energy weights sum differs from one and equal to 0.75

Hi,

I'm training couple of data sets from the same pool of data. for some of them I get:

File "/software/sattarian/anaconda3/envs/ACE/lib/python3.8/site-packages/pyace/preparedata.py", line 826, in generate_
weights
assert np.allclose(energy_weights_sum, 1), "Energy weights sum differs from one and equal to {}".format(
AssertionError: Energy weights sum differs from one and equal to 0.75

what causes this? is it something about my data?

Thanks,
Siamak

Empty radcoefficients list when initializing only first order terms

Hi everyone,

I'm wondering why no radcoefficients are initialized when only defining first order terms and how this can be justified through the mathematical expressions. My input for the functions section is

ALL: {
nradmax_by_orders: [5],
lmax_by_orders: [0]
}
or a different number unequal 0 instead of 5.
In the output potential the radcoefficients list/ array remains empty, like:
...
radparameters: [5.25]
radcoefficients: []
core-repulsion: [0, 0]
...

The way I understand the mathematical expressions in the appendix B section of the paper Efficient parametrization of the atomic cluster expansion there could be values for the coefficient. Or do I get there something wrong with the formulas?

Try to continue fitting part of the potential

Hi,

I fitted a potential for two elements. Now, I want to only fine tune the parameters for one element. How could do this?
E.g. I begin with a Ti-O potential, the Ti part seems good. I want to fine tune the O part. I know how to only continue training the Ti-O part. But no idea how to contine training the O part.

Best

Segmentation fault (core dumped)

Hi,

I have successfully installed pyace following the instructions (without any warning). But I encountered the 'Segmentation fault (core dumped)' error when I was using pacemaker. I have used the precious version of pyace and it works well. Have you ever encountered such a problem?

Kind regards,

Lei

Atomic features

Hi,

Is there a way to get access to the atomic features after fitting a potential? l mean is there a simple way to use the python functions with in the code to input an atomic configuration (a unit cell or a super cell) and output the features that are calculated for each atom based on a fitted potential (basically based on the number of N body terms used in the potential and fitted values for the radial basis)?

I'm trying an active learning/sampling method and I rather use the features that are being used in the ACE, than using a different featurization.

Thanks,
Siamak

How to set element(-pair) specific functions block in potential config

When creating a potential config dictionary for use in create_multispecies_basis_config the documentation mentions that it's possible to set element specific configuration by using the element names or tuples of them.

I've started with this config

  'functions': {
          # 'number_of_functoins_per_element': 100,
          'ALL': {
              'nradmax_by_orders': [10, 2, 2],
              'lmax_by_orders':    [0,  1, 2],
              # 'number_of_functions_per_element': 100,
          },           
          'Mg': {
              'nradmax_by_orders': [0],
              'lmax_by_orders':    [0],
          },          
  }

which works. But if I add another key with the pair Mg/Al I get various errors:

Using 'MgAl' as the key I get

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_13028/825369504.py in <cell line: 1>()
----> 1 bbasis = pyace.create_multispecies_basis_config(pot_conf)
      2 calc = pyace.PyACECalculator(bbasis)

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in create_multispecies_basis_config(potential_config, unif_mus_ns_to_lsLScomb_dict, func_coefs_initializer, initial_basisconfig)
    328     new_basis_conf.deltaSplineBins = potential_config.get("deltaSplineBins", 0.001)
    329     new_basis_conf.funcspecs_blocks = blocks_list
--> 330     validate_bonds_nradmax_lmax_nradbase(new_basis_conf)
    331     new_basis_conf.validate(raise_exception=True)
    332     return new_basis_conf

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in validate_bonds_nradmax_lmax_nradbase(ext_basis)
    991 
    992     # loop over max_nlk_dict and symmetrize pair bonds
--> 993     for bond_pair, dct in max_nlk_dict.items():
    994         if len(bond_pair) == 2:
    995             sym_bond_pair = (bond_pair[1], bond_pair[0])

RuntimeError: dictionary changed size during iteration

Using ('Mg','Al') I get

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_13028/825369504.py in <cell line: 1>()
----> 1 bbasis = pyace.create_multispecies_basis_config(pot_conf)
      2 calc = pyace.PyACECalculator(bbasis)

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in create_multispecies_basis_config(potential_config, unif_mus_ns_to_lsLScomb_dict, func_coefs_initializer, initial_basisconfig)
    313         potential_config["embeddings"] = embeddings
    314 
--> 315     blocks_list = create_multispecies_basisblocks_list(potential_config,
    316                                                        element_ndensity_dict=element_ndensity_dict,
    317                                                        func_coefs_initializer=func_coefs_initializer,

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in create_multispecies_basisblocks_list(potential_config, element_ndensity_dict, func_coefs_initializer, unif_mus_ns_to_lsLScomb_dict, verbose)
    571                                          unif_mus_ns_to_lsLScomb_dict=None,
    572                                          verbose=False) -> List[BBasisFunctionsSpecificationBlock]:
--> 573     blocks_specifications_dict = generate_blocks_specifications_dict(potential_config)
    574 
    575     if unif_mus_ns_to_lsLScomb_dict is None:

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in generate_blocks_specifications_dict(potential_config)
    415     ### possible keywords: ALL, UNARY, BINARY, TERNARY, QUATERNARY, QUINARY + (el,el,...)
    416     if "functions" in potential_config:
--> 417         functions_ext = generate_functions_ext(potential_config)
    418     else:
    419         functions_ext = {}

/cmmc/u/zora/pyiron/projects/2022/ACE_SegregationLearning/python-ace/src/pyace/multispecies_basisextension.py in generate_functions_ext(potential_config)
    451                 functions_ext[key].update(functions[nary_key])
    452     for k in functions:
--> 453         if k.strip() not in KEYWORDS:
    454             if isinstance(k, str):  # single species string
    455                 key = tuple(element_patt.findall(k))

AttributeError: 'tuple' object has no attribute 'strip'

Let me know if I'm missing something.

New version on pip?

We want to integrate the ACE descriptors into pyiron. Since the main branch here is now somewhat different than the one on PyPI and has some new features, we want to use that one for the integration. Are you planning on releasing a new version soon?

ladder_step, cycle_step and iter_num

Hi, I'm not very sure the meaning of ladder_step, cycle_step and iter_num in the output file of metrics.txt. Could you provide more explanation for them?

iter_num should be equal to the number of mini-batch of data, right?
ladder_step should be related to Ladder fitting.
But what is cycle_step? why is cycle_step always zero when I was fitting potentials?
what is the relationship among ladder_step, cycle_step and iter_num?

Gradients of B-Basis Projections

Hello,

your tool allows obtaining the projections of the B-basis for configurations. Does your tool also support retrieving the gradients of the B-basis functions at specific positions? I need those for a GPR-based approach to construct force kernels.

Best Regards!

Many-body heat flux correction

Hi @yury-lysogorskiy

I am currently exploring to use the PACE framework to predict the thermal conductivity of AlGaN alloys using the Green-Kubo method (by performing equilibrium molecular dynamics simulations). So I was just wondering how are multi-body heat flux corrections (the atomic virial terms) handled in the implementation of PACE interface with LAMMPS? should I write a wrapper based on the the forces predicted by PACE?

few relevant papers (maybe):

Active learning with unparametrized ACE potential

Hello,

In the beginning of fitting using "pacemaker" a "target_potential.yaml" file is generated which is an unparametrized ACE potential, but has the same hyperparameters as the finally fitted potential. Does it make sense to use that potential for active sampling using "pace_activeset"? I guess for active sampling with D-optimality, only the ACE features are required which must be accessible from "target_potential.yaml"

I'm trying to get a representative set of structures from a dataset of 10,000 structures. Initially I randomly select 100 structures, make an "input.yaml" file with the desired hyperparameters, then run "pyace" with the flag "--no-fit" so I get the "target_potential.yaml". Then use "pace_activeset" using the initial 100 random structures and the "target_potential.yaml", to get the active set, then loop over the whole data set using a python code that includes "calc.results['gamma']" of the ACE calculator in ASE to get the extrapolation grade of the structures. and continue this procedure until I get to roughly around 1000 structures that represent the whole data set.

Does this make sense? I'm using "target_potential.yaml" instead of fitting a whole new potential at each active learning cycle, to accelerate the whole process.

Thanks

Some questions about some parameters in input.yaml::potential

For bond section in input.yaml::potential, could explain which parameters in the equations of your 2022 PRM paper correspond to radparameters, rcut and dcut in input.yaml?
What is the relation between the two parameters, rcut and cutoff, in input.yaml?
When change cutoff, should one also change the values for radparameters, rcut and dcut?

What does UNARY mean for embedding, bonds and functions? For embedding, what is the difference between UNARY and single element, e.g. Al or Ni?

If I have trained AB.yaml and AC.yaml for the two single two-element salts AB and AC (in the training/test dataset, the composition is always 50:50 for a single salt), respectively, and then would like to train an ABC.yaml works well for binary mixture AB_x-AC_(1-x), (x is in the range of b/t 0 and 1),
I guess:
in the upfitting: I don't need to specify anything for embedding; for bonds I just need to specify BC; for functions, I just need to specify (B, C) and TERNARY.
is it right?

Next, if I have trained ABC.yaml, ABD.yaml and BCD.yaml for the three binary salt mixtures, AB-AC, AB-AD and AC-AD, respectively, and then would like to train an ABCD.yaml for any ternary mixture AB_x-AC_y-AD_(1-x-y),
I feel:
in the upfitting: I don't need to specify anything for embedding and bonds, and I just need to specify QUATERNARY, is it correct?

For core repulsion, I know from your 2022 PRM paper that the repulsion is solely controlled by \rho_core or the equation C11 when r < r_in - \Delta_in. But what is the core repulsion when r_in - \Delta_in < r < r_in ?

How to use 'number_of_functions_per_element' from the python interface

I'm calculating the ACE descriptors with the ASE calculator as in the example with pyace.create_multispecies_basis_config.

This is my potential config

pot_conf =  {
    'deltaSplineBins': 0.001,
    'elements': ['Al', 'Mg'],

    'embeddings': {'ALL': {'drho_core_cut': 250,
                           'fs_parameters': [1, 1],
                           'ndensity': 1,
                           'npot': 'FinnisSinclair',
                           'rho_core_cut': 200000},
                  },

    'bonds': {'ALL': {'NameOfCutoffFunction': 'cos',
                      'core-repulsion': [10000.0, 5.0],
                      'dcut': 0.01,
                      'radbase': 'ChebPow',
                      'radparameters': [2.0],
                      'rcut': 6},
             },
                   
    'functions': {'ALL': {
            'nradmax_by_orders': [10, 2, 2, 1],
            'lmax_by_orders':    [0,  1, 2, 1]
        }
    }
}

This works, but now I'd like to use the new 'number_of_functions_per_element' feature. I've tried

  1. to add it to the functions block, but it seems to be ignored,
  2. to replace the contents of the ['functions']['ALL'] block with {'number_of_functions_per_element': 200}. This gives an error that nradmax and lmax are not defined.

Grepping the source I find mentions of it only in the generalfit module and the pacemaker script. Is it not yet available from the python interface?

CPU parallelization

Hi,

Is it possible to use CPU parallelization for training with TensorPotential? I think my potential fitting session uses only 1 core.

Also, is parallelization possible when using PyACECalculator?

Thanks,
Siamak

Extracting the ACE descriptors out of PyACE

Dear developers,

I was wondering if is possible to extract the ACE vectors separately as one can do with the julia implementation. My understanding is pacemaker is used for fitting but it would be a nice feature to extract and visualise the ACE vectors (UMAP, PCA, etc) before fitting to see the data shape.

Radial Regularization Documentation

Hi,

Is there documentation somewhere on how the radial regularization works?

From reading the source code, I assume that w0_rad, w1_rad, and w2_rad are weights for derivative orders. Is there a more explicit description?

Best,
-Mike

Need suggestion for fitting a five-component system

Dear developers,

I am currently configuring an ACE potential for a five-component system and require some guidance regarding the settings in input.yaml. I have a few questions that I hope you can help address:

  1. Referring to PRM 2022 Figures 4, 8, and 10, there's a discussion on the relationship between "#funcs/element" and RMSE to derive the "q" value. Is "#funcs/element" equivalent to the number_of_functions_per_element setting in input.yaml? During the training process, which involves ladder steps, I noticed that both the number of functions and parameters increase gradually in a log file. I want to ensure I correctly understand the definition of "number of functions."

Since the system I am fitting now is similar to HEA in the example case, so I referred to the example input.yaml for my case and have the following questions.

  1. For the functions section, the example input.yaml defines "ALL, QUATERNARY, and QUINARY" with identical settings for nradmax_by_orders and lmax_by_orders. Does the order of these keywords matter? Should I also include Unary through Ternary levels? Furthermore, do you have any recommendations for selecting values for nradmax_by_orders and lmax_by_orders, or is it generally based on empirical training performance?

  2. In the fit section, the example input.yaml employs an "EnergyBasedWeightingPolicy" with notably high DE and DF values. Given the suggestion in PRM 2022 that DE or DF should be approximately 1, is there a specific rationale for setting such high values?

  3. How can I estimate the number of iterations that will execute based on the ladder_step? For example, with number_of_functions_per_element set to 1500 and ladder_step to 5, my log.txt indicates that the function count starts at 400 and increases by 400 with each iteration, now reaching 5200.

I appreciate any advice or insights you can provide.

Thank you!

Error when using trf/lm/dogbox optimizer

Hello developers,
I am trying optimizers in python-ace, and I met a problem when using trf/lm/dogbox optimizer. Here is the error information when I set optimizer as 'lm' for the example of Cu-I:

2024/07/11 11:21:42 I - Loss function specification: LossFunctionSpecification(kappa=0, L1=1e-08, L2=1e-08, DeltaRad=(1e-08, 1e-08, 1e-08), w_orth=0)
2024/07/11 11:21:42 I - Batch size: 100
Traceback (most recent call last):
  File "/home/hao/.local/bin/pacemaker", line 401, in <module>
    main(sys.argv[1:])
  File "/home/hao/.local/bin/pacemaker", line 248, in main
    general_fit.fit()
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/generalfit.py", line 481, in fit
    self.target_bbasisconfig = self.ladder_fitting(self.initial_bbasisconfig, self.target_bbasisconfig)
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/generalfit.py", line 509, in ladder_fitting
    current_bbasisconfig = self.cycle_fitting(current_bbasisconfig)
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/generalfit.py", line 564, in cycle_fitting
    current_bbasisconfig = self.fit_backend.fit(
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/fitadapter.py", line 129, in fit
    raise e
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/fitadapter.py", line 96, in fit
    fit_res = self.run_tensorpot_fit(bbasisconfig, dataframe, loss_spec, fit_config,
  File "/home/hao/.local/lib/python3.10/site-packages/pyace/fitadapter.py", line 236, in run_tensorpot_fit
    self.fitter.fit(dataframe, test_df=test_dataframe, niter=fit_config[FIT_NITER_KW],
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/fit.py", line 99, in fit
    res_opt = least_squares(ls_opt_func.func, coefs, jac=ls_opt_func.jac,
  File "/home/hao/.local/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py", line 832, in least_squares
    f0 = fun_wrapped(x0)
  File "/home/hao/.local/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py", line 830, in fun_wrapped
    return np.atleast_1d(fun(x, *args, **kwargs))
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/fit.py", line 487, in func
    self.update(x, batches)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/fit.py", line 481, in update
    resid_value, jacob_value = self.run_fit(x, batches)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/fit.py", line 436, in run_fit
    loss, jac, e, f = self.tensorpot_fit.tensorpot.external_vector_fit(x, b)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/tensorpot.py", line 391, in external_vector_fit
    loss, grad_loss, e, f, self.reg_components = self._evaluate_vector_loss(*input2evaloss(data))
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/tensorpot.py", line 193, in _evaluate_vector_loss
    loss, grad_loss, e, f = self.compute_vector_grad()
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/tensorpot.py", line 325, in compute_vector_grad
    e = self.forward_pass(pos)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/tensorpot.py", line 247, in forward_pass
    e_atomic = self.potential.compute_atomic_energy(r_ij,
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/potentials/ace.py", line 496, in compute_atomic_energy
    e_atom = self.eval_atomic_energy(r_ij)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorpotential/potentials/ace.py", line 420, in eval_atomic_energy
    a_munlm_r = tf.tensor_scatter_nd_update(a_munlm_r, update_index, a_nlm_r)
  File "/home/hao/.local/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/hao/.local/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 5983, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__TensorScatterUpdate_device_/job:localhost/replica:0/task:0/device:CPU:0}} Indices and updates specified for empty output shape [Op:TensorScatterUpdate] name: 

Could you tell me the hint to solve the problem?

Best,
Hao

Minimum GCC/G++ version?

Hi,

I was encountering compiler errors in several files in pyace/ace-evaluator, by loading a new version of GCC I was able to compile normally.

Perhaps a minimum compiler version in the docs would be helpful?

Cheers,
-Mike

Large Force Errors

Thank you for sharing this code, it is a very nice package.

I have however been running into an issue, which I have not been able to solve. I have a dataset of perturbed crystal and liquid configurations, (~10k crystal environments, ~10k liquid) made up of well-converged DFT calculations for a binary alloy. I have noticed that, although the crystal configurations train very well, any addition of the liquid configurations causes the forces to go haywire. This includes training on just the liquid configurations, and results in a parity plot with a nearly vertical line as shown below. The wide range of predicted forces tells me that this not just a poor fit, or noisy data, but rather something going wrong in preparation of the dataset or training. I have been testing all aspects of preparation (QE+ASE, even with classical force fields!) and training (kappa, potential size, # iterations) and cannot find the cause yet. Only selecting the linear embedding results in any improvement (reduced magnitude of forces).

Has anyone come across a similar situation? I am happy to share any material. Thanks in advance.

Forces

Special case for training data that would cause error during active set generation

This is not actually a question, just something that I came across and thought might be interesting to the users.

I have a system of four species (F, Li, Be and Cr) where Cr is an impurity and there is only one of it in the unit cell. My unit cell size is about 11 angstrom and I'm using cutoff radius of 10 angstrom for training (so the atoms won't see their own periodic images).
Since there is only 1 atom of Cr in the system, the the parameters for Cr-Cr end up being zero after the training due to no information about their interaction, which is fine. The problem is when I'm trying to generate an active set I'm getting the following error:

###########################
Traceback (most recent call last):
File "/home/sattarian/.local/bin/pace_activeset", line 169, in
A_active_set_dict = compute_active_set(A0_proj_dict, tol=gamma_tolerance, max_iters=maxvol_iters, verbose=True)
File "/home/sattarian/.local/lib/python3.8/site-packages/pyace/activelearning.py", line 285, in compute_active_set
selected_rows, _ = maxvol(cur_A0, tol=tol, max_iters=max_iters)
File "/home/sattarian/.local/lib/python3.8/site-packages/maxvolpy/maxvol.py", line 285, in maxvol
return maxvol_func(A, tol=tol, max_iters=max_iters,
File "maxvolpy/_maxvol.pyx", line 114, in maxvolpy._maxvol.c_maxvol
File "maxvolpy/_maxvol.pyx", line 103, in maxvolpy._maxvol.c_maxvol
File "maxvolpy/_maxvol.pyx", line 376, in maxvolpy._maxvol.dmaxvol
ValueError: Input matrix must not be singular
###########################

After playing with the values in the output_potential.yaml, I learned that I need to increase the cutoff radius for Cr-Cr interactions to something higher than 11 (15 for example) temporarily when doing the active set generation to overcome this issue.

you may want to add a warning or something to check for such scenario before hand so the user won't be confused when facing this error

Thanks,
Siamak

Maximum number of species ACE can fit in one potential

Hello,

I was wondering if there is a "hard coded" limit to the maximum number of species that can be included in one ACE potential in the LAMMPS library of ACE. I'm trying to fit a 12 species system. I tried with different number of elements and realized that after 11 elements, the ACE training would not start and gives the 'Killed' error. With a little manipulation in the "trainable parameters" and eliminating some cross terms between some elements, I successfully fitted and ACE potentials for 12 elements. Now that I try using it in LAMMPS (with the yace format) I get the following error:

Loading output_potential.yace
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

If I selectively take out parameters for a certain set of species and convert them to yace and run the same simulation, it works fine, but when all of them are in the yace file, it gives the above error.

My question is if there is a limit to the number of species that can be included in one ACE potential (in the LAMMPS library of ACE)

Thanks,
Siamak

specifying embedding-function for PyACECalculator

Dear developers,

I used the PyACECalculator as an ASE calculator to calculate the energy but met "Notice! No embedding-function is specified, but potential has linear embedding, default embedding-function: FinnisSinclair would be assumed"

The ACE potential for Silicon is from npj Computational Materials (2021)7:97 (https://doi.org/10.1038/s41524-021-00559-9) and the calculation code is as follows:

from pyace import *
from ase.io import read

calc = PyACECalculator("Si_npj_CompMat2021.ace")

atoms = read('POSCAR.mp-149_Si')

Is it possible to use the potential shared by npj Computational Materials (2021)7:97 correctly via ASE calculator like the form mentioned here? Maybe by specifying the embedding-function?

Thanks~

Lei

YAML safe_load has been removed

Hi

I just installed python-ace. While trying to use "pacemaker", i encountered the following fatal error:
"AttributeError: safe_load() has been removed"

My fix was to replace the line with
"
yaml_loader = yaml.YAML(typ='safe', pure=True)
args_yaml = yaml_loader.load(f)
"
directly in the file "/home/alessio/.conda/envs/ace/bin/pacemaker"

README needs update

The links and instructions on README are likely outdated, and needs update. Also example folder is missing.

[feature request] OpenMP support for LAMMPS ML-PACE

It would be very useful for me if we could run PACE potentials with LAMMPS OpenMP support, either direct or via kokkos (in general for small systems where domain decomposition is limited, or in my case mainly because I'm parallelizing over a set of small configurations with MPI and having LAMMPS's MPI domain decomposition coexisting would be hard).

I have no idea what that would entail, but I do have some experience coding OpenMP parallelized interatomic potential (although in fortran, not C++, so fewer pointers). If it seems vaguely feasible to anyone who knows the code well, I'd be happy do discuss and try to put something together. The basic idea we've used before is to have each process loop over a subset of the atoms, then accumulate the energies and force contributions. I looked briefly at pair_pace.cpp, but since I'm not sure about the internals of aceimpl and its ace attribute, I'm not sure how one would go about sharing them across threads in the correct way (read-only bits public, thread-specific bits private or thread_private).

[edited] I just realized that this may be the wrong repo for this feature request, and if so, I apologize. Feel free to tell me, and I'll move it wherever it belongs best.

fitting convergence slow

Hello,

I am trying to fit an ACE model to an amorphous covalent material. BFGS is the optimizer used, it works but the convergence is very slow. Is it possible to instruct BFGS / L-BFGS to take a larger step sizes or switch to another optimizer?

On a single GPU (Tesla-V100) 100 steps of BFGS takes around 1 hr. The potential has ~3000 basis functions (2 elements) and the dataset has ~1200 structures, ~140000 atoms.

Thank you for your work

lost atom when runing lammps

Hi authors. I have used pacemaker to train a pace potential for disordered materials. The training and testing accuracy is impressive. But when I actually run LAMMPS with pace, I encounter a problem where atoms are easily lost. Do you have any suggestions on how to solve this issue? For instance, could it be possible to add some sort of regularization to the training process of pace?

Why can't the GPU be used?

I followed the installation steps on this website: https://pacemaker.readthedocs.io/en/latest/pacemaker/install/ to install Pacemaker. It says that Pacemaker uses GPU by default, and I confirmed that there is only one GPU on the server and the CUDA version is 11.6. However, when I tried to run the Cu-II example with the command "pacemaker input.yaml", I found that it did not use the GPU and only used CPU. How can I solve this problem?

Run PyACECalculator on GPU.

Hi authors! Recently, I've been using the PyACECalculator to calculate NVT molecular dynamics and LBFGS relaxation in ASE on cpus, however, the efficiency is not satisfactory since it is serial mode.

So, I wonder if the PyACECalculator can be run on GPU platforms like the
calculator = MACECalculator(model_path='/content/checkpoints/MACE_model_run-123.model', device='cuda') ? If it can, how about the gpu efficiency comparing to the single cpu thread?

use pace potential in pyiron

Hi
i am trying to do free energy calculation following the tutoriol in potential workshop 2022.

is there a way to upload fitted potential (.yace) for PacemakerJob?

Windows install pyace problem

Hi

I got a problem when running pip install upgrade

  **CMake Error at CMakeLists.txt:5 (project):
    Generator

      Visual Studio 15 2017 Win64

    does not support platform specification, but platform

      x64

    was specified.**

I got visual studio 2022 version, but I am not sure how to ask for it

continue fitting

I tried to continue fitting as below:

pacemaker input.yaml -p ../interim_potential_best_cycle.yaml

But I found that it always started to train from scratch.

From log.txt, I found that
2023/05/31 17:07:04 I - pacemaker/pyace version: 0.2.7+95.g37808e2
2023/05/31 17:07:04 I - ace_evaluator version: 2022.6.27
2023/05/31 17:07:04 I - Loading input.yaml...
2023/05/31 17:07:04 I - Potential settings is overwritten from arguments: ../interim_potential_best_cycle.yaml
2023/05/31 17:07:04 I - Set numpy random seed to 42
2023/05/31 17:07:04 I - Target potential loaded from file '../interim_potential_best_cycle.yaml', it contains 618 functions
2023/05/31 17:07:04 I - Initial potential is NOT provided, starting from empty potential
2023/05/31 17:07:04 I - Ladder-scheme fitting is ON
2023/05/31 17:07:04 I - Ladder_type: power_order is selected

Could you give some suggestions to resolve this issue?

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.