@@ -353,9 +353,6 @@ def parse(self):
353353
354354 return result
355355
356- def save (self , path ):
357- isicle .io .save_pickle (path , self .result )
358-
359356
360357class NWChemParser (FileParserInterface ):
361358 """Extract information from NWChem simulation output files."""
@@ -748,9 +745,6 @@ def parse(self):
748745
749746 return result
750747
751- def save (self , path ):
752- isicle .io .save_pickle (path , self .result )
753-
754748
755749class ImpactParser (FileParserInterface ):
756750 """
@@ -812,41 +806,26 @@ def parse(self):
812806 self .result = result
813807 return result # TODO: return CCS?
814808
815- def save (self , path : str , sep = "\t " ):
816- """
817- Write parsed object to file
818- """
819- pd .DataFrame (self .result ).to_csv (path , sep = sep , index = False )
820- return
821-
822809
823810class MobcalParser (FileParserInterface ):
824811 """
825812 Extract text from a MOBCAL mobility calculation output file.
826813 """
827814
828- def __init__ (self ):
829- """
830- Add docstring
831- """
832- self .contents = None
833- self .result = {}
815+ def __init__ (self , data = None ):
816+ self .data = data
834817
835- def load (self , path : str ):
836- """
837- Load in the data file
838- """
839- with open (path , "r" ) as f :
840- self .contents = f .readlines ()
818+ self .result = {}
841819
842- return self .contents
820+ def load (self , path ):
821+ self .data = isicle .io .load_pickle (path )
843822
844823 def parse (self ):
845824 """
846825 Extract relevant information from data
847826 """
848827 done = False
849- for line in self .contents :
828+ for line in self .data [ "out" ] :
850829 # if "average (second order) TM mobility" in line:
851830 # m_mn = float(line.split('=')[-1])
852831 if "average TM cross section" in line :
@@ -860,37 +839,6 @@ def parse(self):
860839
861840 return self .result
862841
863- def save (self , path : str , sep = "\t " ):
864- """
865- Write parsed object to file
866- """
867- pd .DataFrame (self .result ).to_csv (path , sep = sep , index = False )
868- return
869-
870-
871- class SanderParser (FileParserInterface ):
872- """
873- Extract text from an Sander simulated annealing simulation output file.
874- """
875-
876- def load (self , path : str ):
877- """
878- Load in the data file
879- """
880- raise NotImplementedError
881-
882- def parse (self ):
883- """
884- Extract relevant information from data
885- """
886- raise NotImplementedError
887-
888- def save (self , path : str ):
889- """
890- Write parsed object to file
891- """
892- raise NotImplementedError
893-
894842
895843class XTBParser (FileParserInterface ):
896844 """
@@ -1160,11 +1108,3 @@ def parse(self):
11601108 result ["energy" ] = self ._crest_energy ()
11611109
11621110 return result
1163-
1164- def save (self , path ):
1165- """
1166- Add docstring
1167- """
1168- with open (path , "wb" ) as f :
1169- pickle .dump (self , f )
1170- return
0 commit comments