Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MLIP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Tadah
MLIP
Commits
172b434c
Commit
172b434c
authored
3 months ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
moved scaling to individual descriptors
parent
cb47d330
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!17
Fix bug when reading stress with vaspreader. Added T to structure and adjusted...
Pipeline
#49658
passed
3 months ago
Stage: build_debug
Stage: run_unit_tests
Stage: build_release
Stage: trigger
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/tadah/mlip/descriptors_calc.hpp
+10
-10
10 additions, 10 deletions
include/tadah/mlip/descriptors_calc.hpp
with
10 additions
and
10 deletions
include/tadah/mlip/descriptors_calc.hpp
+
10
−
10
View file @
172b434c
...
...
@@ -258,12 +258,12 @@ void DescriptorsCalc<D2,D3,DM,C2,C3,CM>::calc(const Structure &st, StDescriptors
if
(
use_force
||
use_stress
)
{
fd_type
&
fd_ij
=
st_d
.
fd
[
i
][
jj
];
if
(
rij_sq
<=
rcut_2b_sq
&&
init2b
)
{
d2
.
calc_all
(
Zj
,
rij
,
rij_sq
,
aed
,
fd_ij
);
d2
.
calc_all
(
Zj
,
rij
,
rij_sq
,
aed
,
fd_ij
,
0.5
);
// Two-body descriptor calculates x-direction only - fd_ij(n,0)
// so we have to copy x-dir to y- and z-dir
// and scale them by the unit directional vector delij/rij.
for
(
size_t
n
=
bias
;
n
<
size2b
+
bias
;
++
n
)
{
fd_ij
(
n
,
0
)
*=
0.5
*
rij_inv
;
fd_ij
(
n
,
0
)
*=
rij_inv
;
fd_ij
(
n
,
1
)
=
fd_ij
(
n
,
0
)
*
delij
[
1
];
fd_ij
(
n
,
2
)
=
fd_ij
(
n
,
0
)
*
delij
[
2
];
fd_ij
(
n
,
0
)
*=
delij
[
0
];
...
...
@@ -277,19 +277,19 @@ void DescriptorsCalc<D2,D3,DM,C2,C3,CM>::calc(const Structure &st, StDescriptors
}
else
{
if
(
rij_sq
<=
rcut_2b_sq
&&
init2b
)
{
d2
.
calc_aed
(
Zj
,
rij
,
rij_sq
,
aed
);
d2
.
calc_aed
(
Zj
,
rij
,
rij_sq
,
aed
,
0.5
);
}
}
}
}
if
(
init2b
)
{
for
(
size_t
n
=
0
;
n
<
st
.
natoms
();
++
n
)
{
for
(
size_t
s
=
bias
;
s
<
bias
+
d2
.
size
();
++
s
)
{
st_d
.
get_aed
(
n
)(
s
)
*=
0.5
;
}
}
}
//
if (init2b) {
//
for (size_t n=0; n<st.natoms(); ++n) {
//
for(size_t s=bias; s<bias+d2.size(); ++s) {
//
st_d.get_aed(n)(s) *= 0.5;
//
}
//
}
//
}
}
template
<
typename
D2
,
typename
D3
,
typename
DM
,
typename
C2
,
typename
C3
,
typename
CM
>
void
DescriptorsCalc
<
D2
,
D3
,
DM
,
C2
,
C3
,
CM
>::
calc_dimer
(
const
Structure
&
st
,
StDescriptors
&
st_d
)
{
...
...
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