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
32d9fc0d
Commit
32d9fc0d
authored
2 weeks ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
Integration of --sources into sreader and preditct
parent
eb9e4e36
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#52446
passed
2 weeks ago
Stage: build_debug
Stage: run_unit_tests
Stage: build_release
Stage: trigger
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tadah/mlip/structure.h
+14
-6
14 additions, 6 deletions
include/tadah/mlip/structure.h
src/nn_finder.cpp
+3
-3
3 additions, 3 deletions
src/nn_finder.cpp
with
17 additions
and
9 deletions
include/tadah/mlip/structure.h
+
14
−
6
View file @
32d9fc0d
...
@@ -235,15 +235,23 @@ struct Structure {
...
@@ -235,15 +235,23 @@ struct Structure {
{
{
os
<<
"Structure : "
<<
std
::
left
<<
st
.
label
<<
std
::
endl
;
os
<<
"Structure : "
<<
std
::
left
<<
st
.
label
<<
std
::
endl
;
os
<<
"Weights : "
<<
std
::
left
os
<<
"Weights : "
<<
std
::
left
<<
"E: "
<<
st
.
eweight
<<
"E: "
<<
st
.
eweight
<<
" | F: "
<<
std
::
left
<<
st
.
fweight
<<
" | F: "
<<
std
::
left
<<
st
.
fweight
<<
" | S: "
<<
std
::
left
<<
st
.
sweight
<<
std
::
endl
;
<<
" | S: "
<<
std
::
left
<<
st
.
sweight
<<
std
::
endl
;
os
<<
"# atoms : "
<<
std
::
left
<<
st
.
atoms
.
size
()
<<
std
::
endl
;
os
<<
"Atoms : "
<<
std
::
left
<<
st
.
atoms
.
size
()
<<
" | "
;
for
(
const
auto
&
el
:
st
.
get_unique_elements
())
{
os
<<
" "
<<
el
.
symbol
<<
std
::
left
;
}
os
<<
std
::
endl
;
os
<<
"Energy :"
<<
std
::
right
<<
std
::
setw
(
w
)
os
<<
"Energy :"
<<
std
::
right
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
std
::
fixed
<<
st
.
energy
<<
std
::
endl
;
<<
std
::
setprecision
(
p
)
<<
std
::
fixed
<<
st
.
energy
<<
" "
<<
"Temp :"
<<
std
::
right
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
std
::
fixed
<<
st
.
get_temperature
()
<<
std
::
endl
;
os
<<
"Volume :"
<<
std
::
right
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
std
::
fixed
<<
st
.
get_volume
()
<<
" "
<<
"Density:"
<<
std
::
right
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
std
::
fixed
<<
st
.
get_density
()
<<
std
::
endl
;
os
<<
"Cell :"
<<
std
::
endl
;
os
<<
"Cell :"
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
+
1
0
)
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
+
1
2
)
<<
std
::
setprecision
(
p
)
<<
st
.
cell
(
i
,
0
);
<<
std
::
setprecision
(
p
)
<<
st
.
cell
(
i
,
0
);
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
)
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
st
.
cell
(
i
,
1
);
<<
std
::
setprecision
(
p
)
<<
st
.
cell
(
i
,
1
);
...
@@ -253,7 +261,7 @@ struct Structure {
...
@@ -253,7 +261,7 @@ struct Structure {
}
}
os
<<
"Stress :"
<<
std
::
endl
;
os
<<
"Stress :"
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
+
1
0
)
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
+
1
2
)
<<
std
::
setprecision
(
p
)
<<
st
.
stress
(
i
,
0
);
<<
std
::
setprecision
(
p
)
<<
st
.
stress
(
i
,
0
);
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
)
os
<<
std
::
right
<<
std
::
fixed
<<
std
::
setw
(
w
)
<<
std
::
setprecision
(
p
)
<<
st
.
stress
(
i
,
1
);
<<
std
::
setprecision
(
p
)
<<
st
.
stress
(
i
,
1
);
...
@@ -309,7 +317,7 @@ struct Structure {
...
@@ -309,7 +317,7 @@ struct Structure {
std
::
set
<
Element
>
get_unique_elements
()
const
;
std
::
set
<
Element
>
get_unique_elements
()
const
;
private
:
private
:
const
static
size_t
w
=
1
5
;
// controls output width
const
static
size_t
w
=
1
3
;
// controls output width
const
static
size_t
p
=
6
;
// controls output precision
const
static
size_t
p
=
6
;
// controls output precision
...
...
This diff is collapsed.
Click to expand it.
src/nn_finder.cpp
+
3
−
3
View file @
32d9fc0d
...
@@ -271,15 +271,15 @@ void NNFinder::calc(Structure &st)
...
@@ -271,15 +271,15 @@ void NNFinder::calc(Structure &st)
// Parallel loop over structure database
// Parallel loop over structure database
void
NNFinder
::
calc
(
StructureDB
&
stdb
)
void
NNFinder
::
calc
(
StructureDB
&
stdb
)
{
{
auto
t0
=
std
::
chrono
::
steady_clock
::
now
();
//
auto t0 = std::chrono::steady_clock::now();
#ifdef _OPENMP
#ifdef _OPENMP
#pragma omp parallel for
#pragma omp parallel for
#endif
#endif
for
(
size_t
i
=
0
;
i
<
stdb
.
size
();
i
++
){
for
(
size_t
i
=
0
;
i
<
stdb
.
size
();
i
++
){
calc
(
stdb
(
i
));
calc
(
stdb
(
i
));
}
}
auto
t1
=
std
::
chrono
::
steady_clock
::
now
();
//
auto t1 = std::chrono::steady_clock::now();
double
seconds
=
std
::
chrono
::
duration
<
double
>
(
t1
-
t0
).
count
();
//
double seconds = std::chrono::duration<double>(t1 - t0).count();
// std::cout << "calc(StructureDB &stdb) for-loop took "
// std::cout << "calc(StructureDB &stdb) for-loop took "
// << seconds << " seconds\n";
// << seconds << " seconds\n";
}
}
...
...
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