Source code for nexus.rmg
##################################################################
## (c) Copyright 2020- by Jaron T. Krogel ##
##################################################################
from .simulation import Simulation
from .rmg_input import RmgInput, generate_rmg_input
from .rmg_analyzer import RmgAnalyzer
[docs]
class Rmg(Simulation):
input_type = RmgInput
analyzer_type = RmgAnalyzer
generic_identifier = 'rmg'
application = 'rmg-cpu'
application_properties = set(['serial','mpi'])
application_results = set([''])
[docs]
def check_result(self,result_name,sim):
calculating_result = False
return calculating_result
#end def check_result
[docs]
def get_result(self,result_name,sim):
result = None
self.error('Ability to get result '+result_name+' has not been implemented.')
return result
#end def get_result
[docs]
def incorporate_result(self,result_name,result,sim):
self.error('ability to incorporate result '+result_name+' has not been implemented')
#end def incorporate_result
[docs]
def app_command(self):
return self.app_name+' '+self.infile
#end def app_command
[docs]
def check_sim_status(self):
# assume all is well
self.succeeded = True
self.failed = False
self.finished = self.job.finished
#end def check_sim_status
[docs]
def get_output_files(self): # returns list of output files to save
return []
#end def get_output_files
#end class Rmg
[docs]
def generate_rmg(**kwargs):
sim_args,inp_args = Rmg.separate_inputs(kwargs)
if 'input' not in sim_args:
sim_args.input = generate_rmg_input(**inp_args)
#end if
rmg = Rmg(**sim_args)
return rmg
#end def generate_rmg