Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soap-plus-plus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
soap-plus-plus
Commits
65dcc1bd
Commit
65dcc1bd
authored
8 years ago
by
Carl Poelking
Browse files
Options
Downloads
Patches
Plain Diff
Cluster integration.
parent
a403108e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/soap/contraction.cpp
+1
-1
1 addition, 1 deletion
src/soap/contraction.cpp
src/soap/soapy/kernel.py
+7
-4
7 additions, 4 deletions
src/soap/soapy/kernel.py
with
8 additions
and
5 deletions
src/soap/contraction.cpp
+
1
−
1
View file @
65dcc1bd
...
...
@@ -11,7 +11,7 @@ EnergySpectrum::EnergySpectrum(Spectrum &spectrum, Options &options) : _global_m
options_tmp
.
set
(
"radialcutoff.Rc"
,
_options
->
get
<
std
::
string
>
(
"energyspectrum.radialcutoff.Rc"
));
options_tmp
.
set
(
"radialcutoff.Rc_width"
,
_options
->
get
<
std
::
string
>
(
"energyspectrum.radialcutoff.Rc_width"
));
options_tmp
.
set
(
"radialcutoff.center_weight"
,
_options
->
get
<
std
::
string
>
(
"energyspectrum.radialcutoff.center_weight"
));
if
(
_options
->
hasKey
(
"radialcutoff.Rc_heaviside"
))
{
if
(
_options
->
hasKey
(
"
energyspectrum.
radialcutoff.Rc_heaviside"
))
{
options_tmp
.
set
(
"radialcutoff.Rc_heaviside"
,
_options
->
get
<
std
::
string
>
(
"energyspectrum.radialcutoff.Rc_heaviside"
));
}
_cutoff
=
CutoffFunctionOutlet
().
create
(
_options
->
get
<
std
::
string
>
(
"energyspectrum.radialcutoff.type"
));
...
...
This diff is collapsed.
Click to expand it.
src/soap/soapy/kernel.py
+
7
−
4
View file @
65dcc1bd
...
...
@@ -227,7 +227,7 @@ class KernelAdaptorGlobalSpecificEnergy(object):
def
__init__
(
self
,
options
,
types_global
):
self
.
types_global
=
types_global
return
def
adapt
(
self
,
espectrum
,
return_pos_matrix
=
False
,
dtype
=
'
float64
'
):
def
adapt
(
self
,
e
nergy_
spectrum
,
return_pos_matrix
=
False
,
dtype
=
'
float64
'
):
dim_linear_ab
=
None
dim_linear_total
=
None
S
=
len
(
self
.
types_global
)
...
...
@@ -249,10 +249,11 @@ class KernelAdaptorGlobalSpecificEnergy(object):
j0
=
isb
*
dim_linear_ab
j1
=
j0
+
dim_linear_ab
X
[
i0
:
i1
,
j0
:
j1
]
=
xab
X
=
X
.
flatten
()
X
=
X
/
np
.
dot
(
X
,
X
)
**
0.5
if
return_pos_matrix
:
return
X
,
np
.
array
([[
0.
,
0.
,
0.
]]),
[
"
global
"
]
else
:
return
X
.
flatten
()
else
:
return
X
class
KernelAdaptorGlobalSpecific
(
object
):
def
__init__
(
self
,
options
,
types_global
=
None
):
...
...
@@ -261,7 +262,7 @@ class KernelAdaptorGlobalSpecific(object):
return
def
getListAtomic
(
self
,
spectrum
):
return
[
spectrum
.
getGlobal
()
]
def
adapt
(
self
,
spectrum
):
def
adapt
(
self
,
spectrum
,
return_pos_matrix
=
False
):
# EXTRACT A SET OF CENTER-BASED POWER EXPANSIONS
# Here: only global
IX
=
np
.
zeros
((
0
,
0
),
dtype
=
'
complex128
'
)
...
...
@@ -271,7 +272,9 @@ class KernelAdaptorGlobalSpecific(object):
dimX
=
Xi_norm
.
shape
[
0
]
IX
=
np
.
copy
(
Xi_norm
)
IX
.
resize
((
1
,
dimX
))
return
IX
if
return_pos_matrix
:
return
IX
,
np
.
array
([
0.
,
0.
,
0.
]),
[
"
global
"
]
else
:
return
IX
def
adaptScalar
(
self
,
atomic
):
xnklab_atomic
=
Xnklab
(
atomic
,
self
.
types
)
X
=
xnklab_atomic
.
reduce
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment