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
c48e8c4c
Commit
c48e8c4c
authored
1 month ago
by
Marcin Kirsz
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into 'main'
added get_t See merge request
!18
parents
ebe0c979
1d414081
No related branches found
Branches containing commit
No related tags found
1 merge request
!18
added get_t
Pipeline
#51496
passed
1 month ago
Stage: build_debug
Stage: run_unit_tests
Stage: build_release
Stage: trigger
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tadah/mlip/structure.h
+3
-0
3 additions, 0 deletions
include/tadah/mlip/structure.h
src/structure.cpp
+5
-1
5 additions, 1 deletion
src/structure.cpp
with
8 additions
and
1 deletion
include/tadah/mlip/structure.h
+
3
−
0
View file @
c48e8c4c
...
@@ -140,6 +140,9 @@ struct Structure {
...
@@ -140,6 +140,9 @@ struct Structure {
/** @return density of this structure in g/cm^3 */
/** @return density of this structure in g/cm^3 */
double
get_density
()
const
;
double
get_density
()
const
;
/** @return temperature of this structure in K */
double
get_temperature
()
const
;
/** @return virial pressure calculated from the stress tensor.
/** @return virial pressure calculated from the stress tensor.
*
*
* Units: energy/distance^3
* Units: energy/distance^3
...
...
This diff is collapsed.
Click to expand it.
src/structure.cpp
+
5
−
1
View file @
c48e8c4c
...
@@ -174,7 +174,7 @@ double Structure::get_volume() const {
...
@@ -174,7 +174,7 @@ double Structure::get_volume() const {
return
cell
.
row
(
0
)
*
(
cell
.
row
(
1
).
cross
(
cell
.
row
(
2
)));
return
cell
.
row
(
0
)
*
(
cell
.
row
(
1
).
cross
(
cell
.
row
(
2
)));
}
}
double
Structure
::
get_density
()
const
{
double
Structure
::
get_density
()
const
{
double
V
=
cell
.
row
(
0
)
*
(
cell
.
row
(
1
).
cross
(
cell
.
row
(
2
))
);
double
V
=
get_volume
(
);
V
*=
1e-24
;
// convert to cm^3
V
*=
1e-24
;
// convert to cm^3
double
amu
=
1.66053906660e-24
;
// g
double
amu
=
1.66053906660e-24
;
// g
double
mass
=
0
;
double
mass
=
0
;
...
@@ -182,6 +182,10 @@ double Structure::get_density() const {
...
@@ -182,6 +182,10 @@ double Structure::get_density() const {
return
amu
*
mass
/
V
;
return
amu
*
mass
/
V
;
}
}
double
Structure
::
get_temperature
()
const
{
return
T
;
}
double
Structure
::
get_virial_pressure
()
const
{
double
Structure
::
get_virial_pressure
()
const
{
return
stress
.
trace
()
/
get_volume
()
/
3
;
return
stress
.
trace
()
/
get_volume
()
/
3
;
}
}
...
...
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