diff --git a/src/msspec/utils.py b/src/msspec/utils.py index 3097dd3..f2ee65d 100644 --- a/src/msspec/utils.py +++ b/src/msspec/utils.py @@ -115,7 +115,7 @@ class ForeignPotential(object): class SPRKKRPotential(ForeignPotential): def __init__(self, atoms, potfile, *exported_files): super().__init__() - + """ def read(content, pattern, types): # compile the pattern for regex matching pat = re.compile(pattern, re.MULTILINE) @@ -152,7 +152,7 @@ class SPRKKRPotential(ForeignPotential): (r'^\s*OCCUPATION\s*\n(\s*(?PIQ.*)\n' r'(?P(.*\n)+?))\*+'), [int] * 5 + [float]) - + """ for f in exported_files: # get the IT from the filename # m=re.match('SPRKKR-IT_(?P\d+)-PHAGEN.*', os.path.basename(f)) diff --git a/tests/sprkkr/copper/Cu.py b/tests/sprkkr/copper/Cu.py index f7096f0..b1f1996 100644 --- a/tests/sprkkr/copper/Cu.py +++ b/tests/sprkkr/copper/Cu.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import glob import logging +import os import sys from msspec.calculator import MSSPEC from msspec.utils import get_atom_index @@ -36,6 +37,23 @@ if 'sprkkr' in sys.argv: # calc2.input.control_section.set(POTFIL="Fe.pot_new") # calc2.phagen() + # + # EXPORT POTENTIAL FOR PHAGEN + # + #change task and command + calc.set_command('PHAGEN') + # Change output file + calc.set_outfile('Cu_phagen.out') + #to change task we need to replace input file tempate + calc.set_inpfile("Cu_phagen.inp") + calc.input.control_section.set(DATASET="PHAGEN", ADSI="PHAGEN") + #set potetential file to converged potential + conv_potfile=os.path.join(calc.potfile+'_new') + + calc.set_potfile(conv_potfile) + #run given task + calc.phagen() + # ######### MsSpec part if 'msspec' in sys.argv: