Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
workshop_preparation
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Potentials Workshop 2022
workshop_preparation
Commits
e7e83793
Commit
e7e83793
authored
2 years ago
by
Sudarsan Surendralal
Browse files
Options
Downloads
Patches
Plain Diff
Helper functions in file
parent
48550145
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
More changes and Li-Al example
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
validation/helper.py
+31
-0
31 additions, 0 deletions
validation/helper.py
with
31 additions
and
0 deletions
validation/helper.py
0 → 100644
+
31
−
0
View file @
e7e83793
# This file contains some useful helper functions to make the notebooks more readable
import
pandas
as
pd
import
os
file_location
=
"
../potentials/AlLi.eam.fs
"
with
open
(
file_location
,
"
r
"
)
as
f
:
lines
=
f
.
readlines
()
pot_atomcrex
=
pd
.
DataFrame
({
'
Name
'
:
[
'
LiAl_eam
'
],
'
Filename
'
:
[[
os
.
path
.
abspath
(
file_location
)]],
'
Model
'
:
[
"
EAM
"
],
'
Species
'
:
[[
'
Li
'
,
'
Al
'
]],
'
Config
'
:
[[
'
pair_style eam/fs
\n
'
,
'
pair_coeff * * AlLi.eam.fs Li Al
\n
'
]]
})
potentials_list
=
[
pot_atomcrex
]
def
get_clean_project_name
(
pot
):
if
isinstance
(
pot
,
str
):
return
pot
.
replace
(
"
-
"
,
"
_
"
).
replace
(
"
.
"
,
"
_
"
)
elif
isinstance
(
pot
,
pd
.
DataFrame
):
return
pot
[
"
Name
"
][
0
]
else
:
raise
ValueError
(
"
Invalid potential type
"
)
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