Skip to content

Commit

Permalink
Add option to specify skdef.hsd path for collectspinw script
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhe committed Apr 26, 2024
1 parent c8c5f71 commit 56f7396
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sktools/src/sktools/scripts/collectspinw.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(cmdlineargs=None):
logger = sc.get_script_logger(args.loglevel, SCRIPTNAME)
logger.info('Collecting spinw constants')

skdef = Skdef.fromfile('skdef.hsd')
skdef = Skdef.fromfile(args.configfile)
searchdirs = [args.builddir]
elems = skdef.atomparameters.keys()

Expand Down Expand Up @@ -62,6 +62,11 @@ def parseargs(cmdlineargs):
parser.add_argument('-o', '--onecenter-binary', dest='onecnt_binary',
default=None, help=msg)

parser.add_argument(
'-c', '--config-file', default='skdef.hsd', dest='configfile',
metavar='CONFIGFILE',
help='config file to be parsed (default: ./skdef.hsd)')

msg = 'Logging level (default: info)'
parser.add_argument('-l', '--log-level', dest='loglevel', default='info',
choices=['debug', 'info', 'warning', 'error'], help=msg)
Expand Down

0 comments on commit 56f7396

Please sign in to comment.