singroup / soaplite Goto Github PK
View Code? Open in Web Editor NEWFast lightweight SOAP implementation for machine learning in quantum chemistry and materials physics.
License: GNU Lesser General Public License v3.0
Fast lightweight SOAP implementation for machine learning in quantum chemistry and materials physics.
License: GNU Lesser General Public License v3.0
How do I make sure the periodic boundary conditions are used? The following fails:
from soaplite import getBasisFunc, get_periodic_soap_locals
from ase.build import bulk
atoms = bulk('NaCl', 'rocksalt', a=5.64)
hpos = [
[0, 0, 0],
]
n_max = 5
l_max = 5
r_cut = 10.0
my_alphas, my_betas = getBasisFunc(r_cut, n_max)
x = get_periodic_soap_locals(
atoms,
hpos,
my_alphas,
my_betas,
rCut=r_cut,
NradBas=n_max,
Lmax=l_max,
crossOver=True
)
Traceback:
/soaplite/soaplite.py:49: RuntimeWarning: divide by zero encountered in true_divide
cell_images = np.ceil(rCutHard/xyz_arr)
Traceback (most recent call last):
File "test.py", line 29, in <module>
crossOver=True
File "/home/bart/anaconda3/lib/python3.6/site-packages/soaplite-0.9.14-py3.6-linux-x86_64.egg/soaplite/soaplite.py", line 181, in get_periodic_soap_locals
suce = _get_supercell(obj, rCut)
File "/home/bart/anaconda3/lib/python3.6/site-packages/soaplite-0.9.14-py3.6-linux-x86_64.egg/soaplite/soaplite.py", line 50, in _get_supercell
nx = int(cell_images[0])
OverflowError: cannot convert float infinity to integer
Great thanks for #7 "How to get soap from cif file?"
Sorry for a late reply. I tried them about my cif files and read documents, however I can't fully understand yet.
Some of my data are here
I tried the program you answered about ABAVIJ_clean.cif.
I can't understand how to change the code from 'hydrogen.cif' and the meaning of
*soaplite
pos = [[0, 0, 0]]
rcut = 4
nmax = 6
Thanks.
Hello,
I'm the developer of a set of MD site analysis tools (sitator
) that I'm trying to transition over to Python 3. As part of that I'm looking to get away from QUIP/quippy
with GAP for computing SOAP vectors. SOAPLite looks promising, and I'd love to use it, but I'm having difficulty reproducing my results from QUIP/GAP.
I took the simplified structure struct-one-Li.cif.txt containing one Li atom whose SOAP vector I want to compute. (The rest of the atoms, for simplicity, were all changed to hydrogens.)
quippy
With quippy
, I calculate the SOAP vector:
d = quippy.descriptors.Descriptor("soap cutoff=4.0 cutoff_transition_width=0.5 l_max=6 n_max=6 atom_sigma=0.4 n_Z=1 Z={3} normalize=F")
a_qp = qp.Atoms(structure)
a_qp.set_cutoff(4.0)
a_qp.calc_connect()
soaps = d.calc(a_qp, grad = False)['descriptor']
The resulting SOAP vector (length 148):
SOAPLite
I use this code:
li_mask = structure.get_atomic_numbers() == 3
li_pos = structure.get_positions()[np.where(li_mask)[0][0]]
no_li_struct = structure[~li_mask]
sigma = 0.4
eta = 1/(2*sigma**2)
soaps = soaplite.get_periodic_soap_locals_gauss(static_struct, np.array([li_pos]), rCut = 4.0, nMax = 6, Lmax = 6, eta = eta, all_atomtypes = [1])
The resulting SOAP vector (length 147):
The calculation for eta
is taken from pycsoap
(source code here); I'm not sure if it's correct but it was the best resource I was able to find for how to translate the atom_sigma
parameter.
How can I reproduce my QUIP results with SOAPLite?
Thanks,
A.M.
I would like to obtain separate power spectra for each species to construct a delta chemical kernel.
If I understand correctly, crossover=False
will calculate the spectrum for a single species, but how is it determined which one? The positions hpos
are just positions in 3D space right?
I noticed in the H2O example (in the README), setting crossover=False gives a (2,180)
matrix instead of (2,270)
. The 180 comes from:
terms = 0
for n in range(n_max+1):
for n_prime in range(n_max+1):
for l in range(l_max):
terms += 1
print(terms) # => 180
Why does crossover=True
give 270 coefficients per spectrum?
I have the cif file database for machine learning.
I want to get soap discriptors from these cif files.
Is it possible by SOAPlite?
Hi,
It is a very beautiful implementation of SOAP. I am wondering how to get the equations of c_{nn'l}
in the appendix from the Eqn 4 of soapDoc.pdf. I cannot find this information in both SOAPlite documents and the original paper. It is appreciated if you can add more information about this. Thank you very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.