Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kmos3
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
FHI Theory
kmos3
Merge requests
!58
Develop
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Develop
develop
into
develop-branch-to-in-otf-correction-update
Overview
1
Commits
14
Pipelines
0
Changes
38
Merged
Martin Deimel
requested to merge
develop
into
develop-branch-to-in-otf-correction-update
4 years ago
Overview
1
Commits
14
Pipelines
0
Changes
38
Expand
Created by: kmcos
Changes proposed
0
0
Merge request reports
Compare
develop-branch-to-in-otf-correction-update
develop-branch-to-in-otf-correction-update (base)
and
latest version
latest version
0a7948af
14 commits,
1 year ago
38 files
+
441
−
68
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
38
Search (e.g. *.vue) (Ctrl+P)
kmcos/io.py
+
21
−
0
Options
@@ -39,6 +39,27 @@ from kmcos.types import cmp_coords
from
kmcos.utils
import
evaluate_template
import
collections
def
clear_model
(
ModelName
,
backend
=
"
local_smart
"
):
#this deletes an existing model so that a directory is ready for exporting a new model.
#the model name should be a string.
#Remove any xmls or inis of the model name.
os
.
system
(
"
del
"
+
ModelName
+
"
.xml
"
)
#for windows systems
os
.
system
(
"
rm
"
+
ModelName
+
"
.xml
"
)
#for linux systems
os
.
system
(
"
del
"
+
ModelName
+
"
.ini
"
)
#for windows systems
os
.
system
(
"
rm
"
+
ModelName
+
"
.ini
"
)
#for linux systems
os
.
chdir
(
ModelName
+
"
_
"
+
backend
)
listOfDirectoriesAndFiles
=
os
.
listdir
(
"
.
"
)
os
.
system
(
"
del
"
+
"
*.so
"
)
#for windows systems
os
.
system
(
"
rm
"
+
"
*.so
"
)
#for linux systems
os
.
system
(
"
del
"
+
"
kmc_settings.py
"
)
#for windows systems
os
.
system
(
"
rm
"
+
"
kmc_settings.py
"
)
#for linux systems
if
'
src
'
in
listOfDirectoriesAndFiles
:
os
.
chdir
(
'
src
'
)
os
.
system
(
"
del
"
+
"
*.*
"
)
#for windows systems
os
.
system
(
"
rm
"
+
"
*.*
"
)
#for linux systems
os
.
chdir
(
'
..
'
)
os
.
chdir
(
'
..
'
)
sys
.
stdout
.
flush
()
def
_casetree_dict
(
dictionary
,
indent
=
''
,
out
=
None
):
"""
Recursively prints nested dictionaries.
"""
Loading