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
81e181ae
Commit
81e181ae
authored
3 months ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
new add method
parent
00fe58b5
No related branches found
No related tags found
1 merge request
!12
Develop
Pipeline
#48520
failed
3 months 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/st_descriptors_db.h
+11
-8
11 additions, 8 deletions
include/tadah/mlip/st_descriptors_db.h
src/st_descriptors_db.cpp
+3
-0
3 additions, 0 deletions
src/st_descriptors_db.cpp
with
14 additions
and
8 deletions
include/tadah/mlip/st_descriptors_db.h
+
11
−
8
View file @
81e181ae
...
@@ -15,25 +15,28 @@
...
@@ -15,25 +15,28 @@
*
*
*/
*/
struct
StDescriptorsDB
{
struct
StDescriptorsDB
{
std
::
vector
<
StDescriptors
>
st_descs
;
std
::
vector
<
StDescriptors
>
st_descs
;
StDescriptorsDB
()
{};
StDescriptorsDB
()
{};
/** This constructor fully initialise this object
/** This constructor fully initialise this object
*
*
* Requires:
* Requires:
* - StructureDB st to have all nearest neighbours calculated
* - StructureDB st to have all nearest neighbours calculated
* - Config to contain keys: \ref FORCE, \ref STRESS
* - Config to contain keys: \ref FORCE, \ref STRESS
* and \ref INTERNAL_KEY \ref DSIZE
* and \ref INTERNAL_KEY \ref DSIZE
*/
*/
StDescriptorsDB
(
const
StructureDB
&
stdb
,
Config
&
config
);
StDescriptorsDB
(
const
StructureDB
&
stdb
,
Config
&
config
);
/** Return reference to the n-th StDescriptors
/** Return reference to the n-th StDescriptors
* stored by this object
* stored by this object
*/
*/
StDescriptors
&
operator
()(
const
size_t
n
);
StDescriptors
&
operator
()(
const
size_t
n
);
/** Return number of StDescriptors stored */
/** Return number of StDescriptors stored */
size_t
size
()
const
;
size_t
size
()
const
;
/** Add StDescriptors to DB */
void
add
(
const
StDescriptors
&
st_d
);
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/st_descriptors_db.cpp
+
3
−
0
View file @
81e181ae
...
@@ -15,3 +15,6 @@ StDescriptors &StDescriptorsDB::operator()(const size_t s) {
...
@@ -15,3 +15,6 @@ StDescriptors &StDescriptorsDB::operator()(const size_t s) {
size_t
StDescriptorsDB
::
size
()
const
{
size_t
StDescriptorsDB
::
size
()
const
{
return
st_descs
.
size
();
return
st_descs
.
size
();
}
}
void
StDescriptorsDB
::
add
(
const
StDescriptors
&
st_d
)
{
st_descs
.
push_back
(
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