Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tadah.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
Tadah.MLIP
Commits
0daaac0c
Commit
0daaac0c
authored
1 year ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
Fix to reflect latest changes to the code. Examples compile and produce expected results.
parent
3949c37d
No related branches found
No related tags found
No related merge requests found
Pipeline
#33665
canceled
1 year ago
Stage: build.debug
Stage: run.unit.tests
Stage: build_release
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/ex_1/ex1.cpp
+14
-14
14 additions, 14 deletions
examples/ex_1/ex1.cpp
examples/ex_2/ex2.cpp
+12
-11
12 additions, 11 deletions
examples/ex_2/ex2.cpp
examples/ex_2/pot.tadah
+8
-11
8 additions, 11 deletions
examples/ex_2/pot.tadah
with
34 additions
and
36 deletions
examples/ex_1/ex1.cpp
+
14
−
14
View file @
0daaac0c
#include
<tadah/cutoffs/cut_all.h>
#include
<tadah/
MODELS/
cutoffs/cut_all.h>
#include
<tadah/descriptors/d_all.h>
#include
<tadah/
MODELS/
descriptors/d_all.h>
#include
<tadah/models/m_all.h>
#include
<tadah/
MLIP/
models/m_all.h>
#include
<tadah/basis_functions/bf_all.h>
#include
<tadah/
MLIP/design_matrix/functions/
basis_functions/
dm_
bf_all.h>
#include
<tadah/kernels/kern_all.h>
#include
<tadah/
MODELS/functions/
kernels/kern_all.h>
#include
<tadah/config.h>
#include
<tadah/
CORE/config/
config.h>
#include
<tadah/structure.h>
#include
<tadah/
MLIP/
structure.h>
#include
<tadah/descriptors_calc.h>
#include
<tadah/
MLIP/
descriptors_calc.h>
#include
<tadah/nn_finder.h>
#include
<tadah/
MLIP/
nn_finder.h>
#include
<tadah/output/output.h>
#include
<tadah/
MLIP/
output/output.h>
#include
<fstream>
#include
<fstream>
/** @file ex1.cpp
/** @file ex1.cpp
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
* To compile with `g++` and run:
* To compile with `g++` and run:
*
*
* \code{.sh}
* \code{.sh}
* $ g++ -std=c++17 -O3 ex1.cpp -o ex1.out -ltadah -fopenmp
* $ g++ -std=c++17 -O3 ex1.cpp -o ex1.out -ltadah
-llapack
-fopenmp
* $ ./ex1.out
* $ ./ex1.out
* \endcode
* \endcode
*
*
...
@@ -98,7 +98,7 @@ int main() {
...
@@ -98,7 +98,7 @@ int main() {
// BF is used for M_BLR - Bayesian Linear Regression
// BF is used for M_BLR - Bayesian Linear Regression
// K is used with M_KRR - Kernel Ridge Regression
// K is used with M_KRR - Kernel Ridge Regression
// See documentation for more BF and K
// See documentation for more BF and K
using
BF
=
BF_Linear
;
using
BF
=
DM_
BF_Linear
;
//using BF=BF_Polynomial2;
//using BF=BF_Polynomial2;
//using K=Kern_Linear;
//using K=Kern_Linear;
//using K=Kern_Quadratic;
//using K=Kern_Quadratic;
...
@@ -107,10 +107,10 @@ int main() {
...
@@ -107,10 +107,10 @@ int main() {
using
M
=
M_BLR
<
BF
>
;
using
M
=
M_BLR
<
BF
>
;
//using M=M_KRR<K>;
//using M=M_KRR<K>;
// STEP 2c: Instantiate a model
//
//
STEP 2c: Instantiate a model
M
model
(
config
);
M
model
(
config
);
std
::
cout
<<
"TRAINING STAGE..."
<<
std
::
flush
;
//
std::cout << "TRAINING STAGE..." << std::flush;
// STEP 3: Training - Option 1.
// STEP 3: Training - Option 1.
// Train with StructureDB only. We have to provide calculators here.
// Train with StructureDB only. We have to provide calculators here.
...
...
This diff is collapsed.
Click to expand it.
examples/ex_2/ex2.cpp
+
12
−
11
View file @
0daaac0c
#include
<tadah/cutoffs/cut_all.h>
#include
<tadah/MODELS/cutoffs/cut_all.h>
#include
<tadah/descriptors/d_all.h>
#include
<tadah/MODELS/descriptors/d_all.h>
#include
<tadah/models/m_all.h>
#include
<tadah/MLIP/models/m_all.h>
#include
<tadah/descriptors_calc.h>
#include
<tadah/MLIP/descriptors_calc.h>
#include
<tadah/config.h>
#include
<tadah/CORE/config/config.h>
#include
<tadah/structure.h>
#include
<tadah/MLIP/structure.h>
#include
<tadah/nn_finder.h>
#include
<tadah/MLIP/nn_finder.h>
#include
<tadah/output/output.h>
#include
<tadah/MLIP/output/output.h>
#include
<tadah/MLIP/design_matrix/functions/dm_f_all.h>
#include
<fstream>
#include
<fstream>
/** @file ex2.cpp
/** @file ex2.cpp
...
@@ -15,7 +16,7 @@
...
@@ -15,7 +16,7 @@
* To compile with `g++` and run:
* To compile with `g++` and run:
*
*
* \code{.sh}
* \code{.sh}
* $ g++ -std=c++17 -O3 ex2.cpp -o ex2.out -ltadah -fopenmp
* $ g++ -std=c++17 -O3 ex2.cpp -o ex2.out -ltadah
-llapack
-fopenmp
* $ ./ex2.out
* $ ./ex2.out
* \endcode
* \endcode
*
*
...
@@ -64,7 +65,7 @@ int main() {
...
@@ -64,7 +65,7 @@ int main() {
// If keyword is not listed use `Cut_Dummy`.
// If keyword is not listed use `Cut_Dummy`.
// `pot.tadah`: RCTYPE2B Cut_Cos
// `pot.tadah`: RCTYPE2B Cut_Cos
using
C2
=
Cut_Cos
;
using
C2
=
Cut_Cos
;
// `pot.tadah` no keywords
o
fr three-body and many-body
// `pot.tadah` no keywords f
o
r three-body and many-body
using
C3
=
Cut_Dummy
;
using
C3
=
Cut_Dummy
;
using
CM
=
Cut_Dummy
;
using
CM
=
Cut_Dummy
;
...
@@ -73,7 +74,7 @@ int main() {
...
@@ -73,7 +74,7 @@ int main() {
// K is used with M_KRR - Kernel Ridge Regression
// K is used with M_KRR - Kernel Ridge Regression
// KEYWORD `MODEL`: first argument is model, second BF/Kernel
// KEYWORD `MODEL`: first argument is model, second BF/Kernel
// `pot.tadah`: MODEL M_KRR Kern_Linear
// `pot.tadah`: MODEL M_KRR Kern_Linear
using
K
=
Kern_Linear
;
using
K
=
DM_
Kern_Linear
;
// STEP 2b: Select Model and instantiate object.
// STEP 2b: Select Model and instantiate object.
// `pot.tadah`: MODEL M_KRR Kern_Linear
// `pot.tadah`: MODEL M_KRR Kern_Linear
...
...
This diff is collapsed.
Click to expand it.
examples/ex_2/pot.tadah
+
8
−
11
View file @
0daaac0c
ALPHA 1
.0
ALPHA 1
BETA 1
.0
BETA 1
BIAS
tru
e
BIAS
fals
e
CGRID2B -1 4 1.0 5.3
CGRID2B -1 4 1.0 5.3
CHECKPRESS false
DIMER false
DIMER false 0 false
EWEIGHT 1.0
EWEIGHT 1.0
FWEIGHT 1
.0
FWEIGHT 1
INIT2B true
INIT2B true
INIT3B false
INIT3B false
INITMB false
INITMB false
LAMBDA 0
LAMBDA 0
MODEL M_BLR BF_Linear
MODEL M_BLR BF_Linear
NMEAN 1 194.0239012 198.413198 167.8651188 8.242704556
NORM false
NORM true
NSTDEV 0 2.79425471 2.914508228 1.43784523 0.3225202259
OUTPREC 10
OUTPREC 10
RCTYPE2B Cut_Cos
RCTYPE2B Cut_Cos
RCUT2B 5.3
RCUT2B 5.3
SGRID2B -2 4 0.1 1.0
SGRID2B -2 4 0.1 1.0
SWEIGHT 1
.0
SWEIGHT 1
TYPE2B D2_Blip
TYPE2B D2_Blip
WEIGHTS
-4.415741551
0.
4218953511 -0.3750771288 -0.06328812171 -0.05230011264
WEIGHTS
0.3501814918
-
0.
2916197278 -0.08735823387 -0.04659144812
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