Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
soap-plus-plus
Commits
25c8a15c
Commit
25c8a15c
authored
Jun 02, 2016
by
Carl Poelking
Browse files
Radial basis ticks.
parent
b668b168
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
25c8a15c
apply
build
./
soap
soap
Makefile
test/old
test/back
...
...
@@ -10,3 +10,83 @@ test/back
*.cube
*.arch
*.back
clean.sh
cxx_tests/load.gp
cxx_tests/soap_tests/
cxx_tests/src/gtest_options.py
cxx_tests/src/soap
cxx_tests/tmp
cxx_tests/tmp_basis
cxx_tests/tmp_cutoff
make.sh
py_tests/sandbox/
py_tests/src/config_simple_L.xyz
py_tests/src/kernel.py
py_tests/src/soap
py_tests/src/test.py
src/soap/tools/.ipynb_checkpoints/
src/soap/tools/sandbox.ipynb
test/configs/C60.xyz
test/configs/C60_pair.xyz
test/configs/DCV5T_ME3.xyz
test/configs/d2t/
test/configs/line.xyz
test/configs/linedot.xyz
test/configs/misc/
test/density.load.gp
test/l1.tab
test/soap
test/svd/
test/test_integrals/d2t.tar
test/test_integrals/system_alq3/
test/test_integrals/system_dcv2t/
test/test_integrals/system_dpbic/
test/test_integrals/work_dcv2t/
test/test_invert/soap
test/test_invert/test_qnlm.py
test/test_invert/vmdrender.py
test/test_invert/vmdsetup.tcl
test/test_invert/vmdtools.py
test/test_invert_standalone/line.xyz
test/test_invert_standalone/soap
test/test_invert_standalone/vmdsetup.tcl
test/test_kernelpot/ksize_1_xi_4
test/test_kernelpot/ksize_2_xi_4
test/test_kernelpot/load.gp
test/test_kernelpot/load_3d.gp
test/test_kernelpot/load_vec.gp
test/test_kernelpot/log.xyz
test/test_kernelpot/log_cg.xyz
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.0
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.0_no_2l+1
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.5
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.5_no_2l+1
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.5_with_2l+1
test/test_kernelpot/map_excludecenters_2_3_centerweight_0.5_with_2l+1_vectors
test/test_kernelpot/map_excludecenters_2_3_centerweight_1.0
test/test_kernelpot/map_excludecenters_2_3_centerweight_1.0_no_2l+1
test/test_kernelpot/map_excludecenters__centerweight_0.5_no_2l+1
test/test_kernelpot/map_steep_conjgrad.py
test/test_kernelpot/out
test/test_kernelpot/out_global
test/test_kernelpot/plot_global/
test/test_kernelpot/plot_sanity_check/
test/test_kernelpot/plot_sanity_check_summed/
test/test_kernelpot/soap
test/test_kernelpot/tmp
test/test_kernelpot/tmp2
test/test_multiprocessing/group_rnd_2048.tar
test/test_multiprocessing/group_rnd_2048/
test/test_multiprocessing/group_rnd_short/
test/test_multiprocessing/process.py.fiddle
test/test_multiprocessing/soap
test/test_particle_collection/soap
test/test_particle_collection/vmdsetup.tcl
test/test_serialization/config_000057.xyz.spectrum.arch-2
test/test_serialization/soap
test/test_serialization/vmdsetup.tcl
test/test_suite/
test/test_types/soap
test/tmp
test/vmdsetup.tcl
cxx_tests/src/gtest_radialbasis.cpp
View file @
25c8a15c
...
...
@@ -157,6 +157,51 @@ TEST_F(TestRadialBasisGaussian, computeCoefficientsGradients) {
//std::cout << capture << std::endl;
}
/*
TEST_F(TestRadialBasisGaussian, computeCoefficientsGradientsStdout) {
// PARAMETERS: SETUP
double sigma = 0.5;
soap::vec d(0.,1.,0.);
double dr = 0.05;
double N_r_samples = 100;
std::vector< std::pair<int,int> > kl_list {
std::pair<int,int>{0,0},
std::pair<int,int>{1,0},
std::pair<int,int>{2,0},
std::pair<int,int>{3,0},
std::pair<int,int>{4,0},
std::pair<int,int>{5,0},
std::pair<int,int>{6,0},
std::pair<int,int>{7,0},
std::pair<int,int>{8,0} };
// OUTPUT: SETUP
int N = _radbasis->N();
int L = _options.get<int>("angularbasis.L");
soap::RadialBasis::radcoeff_t Gnl = soap::RadialBasis::radcoeff_zero_t(N,L+1);
soap::RadialBasis::radcoeff_t dGnl_dx = soap::RadialBasis::radcoeff_zero_t(N,L+1);
soap::RadialBasis::radcoeff_t dGnl_dy = soap::RadialBasis::radcoeff_zero_t(N,L+1);
soap::RadialBasis::radcoeff_t dGnl_dz = soap::RadialBasis::radcoeff_zero_t(N,L+1);
// GENERATE
for (int i = 0; i < N_r_samples; ++i) {
double ri = i*dr;
_radbasis->computeCoefficients(d, ri, sigma, Gnl, &dGnl_dx, &dGnl_dy, &dGnl_dz);
std::cout << boost::format("%1$+1.7f ") % ri << std::flush;
for (auto kl = kl_list.begin(); kl != kl_list.end(); ++kl) {
int k = (*kl).first;
int l = (*kl).second;
std::cout << boost::format("%1$+1.7e ") %
Gnl(k,l) << std::flush;
}
std::cout << std::endl;
}
}
*/
TEST_F
(
TestRadialBasisGaussian
,
NumericalIntegrationBessel
)
{
// CHECK NUMERICAL INTEGRATION
...
...
test/test.py
View file @
25c8a15c
...
...
@@ -22,7 +22,7 @@ element_mass = {
ase_config_list
=
soap
.
tools
.
ase_load_all
(
'configs'
)
for
config
in
ase_config_list
:
print
config
.
config_file
config
=
ase_config_list
[
1
]
config
=
ase_config_list
[
4
]
osio
<<
config
.
atoms
<<
endl
sigma
=
0.5
...
...
@@ -36,7 +36,7 @@ options.set('radialbasis.N', 9)
options
.
set
(
'radialbasis.sigma'
,
sigma
)
options
.
set
(
'radialbasis.integration_steps'
,
15
)
#options.set('radialbasis.N', 9)
options
.
set
(
'radialcutoff.Rc'
,
6.8
)
options
.
set
(
'radialcutoff.Rc'
,
3.41
)
options
.
set
(
'radialcutoff.Rc_width'
,
0.5
)
options
.
set
(
'radialcutoff.type'
,
'shifted-cosine'
)
options
.
set
(
'radialcutoff.center_weight'
,
1.
)
...
...
@@ -66,8 +66,8 @@ for atom in structure:
spectrum
=
soap
.
Spectrum
(
structure
,
options
)
spectrum
.
compute
()
spectrum
.
computePower
()
spectrum
.
save
(
"test_serialization/%s.spectrum.arch"
%
structure
.
label
)
spectrum
.
save
(
"test_invert/%s.spectrum.arch"
%
structure
.
label
)
#
spectrum.save("test_serialization/%s.spectrum.arch" % structure.label)
#
spectrum.save("test_invert/%s.spectrum.arch" % structure.label)
spectrum
.
writeDensity
(
1
,
"C"
,
""
)
spectrum
.
writePowerDensity
(
1
,
"C"
,
""
,
""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment