nexus: add rmg simulation class

This commit is contained in:
Jaron Krogel 2021-01-12 14:20:15 -05:00
parent 9ea91c2228
commit fd9b5a7725
3 changed files with 80 additions and 0 deletions

View File

@ -46,6 +46,7 @@ from vasp import Vasp , VaspInput , VaspAnalyzer , generate_vasp_input
from qmcpack import Qmcpack, QmcpackInput, QmcpackAnalyzer, generate_qmcpack_input, generate_qmcpack
from quantum_package import QuantumPackage,QuantumPackageInput,QuantumPackageAnalyzer,generate_quantum_package_input,generate_quantum_package
from pyscf_sim import Pyscf, PyscfInput, PyscfAnalyzer, generate_pyscf_input, generate_pyscf
from rmg import Rmg, RmgInput, RmgAnalyzer, generate_rmg_input, generate_rmg
from qmcpack_converters import Pw2qmcpack , Pw2qmcpackInput , Pw2qmcpackAnalyzer , generate_pw2qmcpack_input , generate_pw2qmcpack
from qmcpack_converters import Convert4qmc, Convert4qmcInput, Convert4qmcAnalyzer, generate_convert4qmc_input, generate_convert4qmc

69
nexus/lib/rmg.py Normal file
View File

@ -0,0 +1,69 @@
##################################################################
## (c) Copyright 2020- by Jaron T. Krogel ##
##################################################################
from simulation import Simulation
from rmg_input import RmgInput,generate_rmg_input
from rmg_analyzer import RmgAnalyzer
class Rmg(Simulation):
input_type = RmgInput
analyzer_type = RmgAnalyzer
generic_identifier = 'rmg'
application = 'rmg-cpu'
application_properties = set(['serial','mpi'])
application_results = set([''])
def check_result(self,result_name,sim):
calculating_result = False
return calculating_result
#end def check_result
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
def incorporate_result(self,result_name,result,sim):
self.error('ability to incorporate result '+result_name+' has not been implemented')
#end def incorporate_result
def app_command(self):
return self.app_name
#end def app_command
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
def get_output_files(self): # returns list of output files to save
return []
#end def get_output_files
#end class Rmg
def generate_rmg(**kwargs):
sim_args,inp_args = Rmg.separate_inputs(kwargs)
if not 'input' in sim_args:
sim_args.input = generate_rmg_input(**inp_args)
#end if
rmg = Rmg(**sim_args)
return rmg
#end def generate_rmg

10
nexus/lib/rmg_analyzer.py Normal file
View File

@ -0,0 +1,10 @@
##################################################################
## (c) Copyright 2020- by Jaron T. Krogel ##
##################################################################
from simulation import NullSimulationAnalyzer
class RmgAnalyzer(NullSimulationAnalyzer):
None
#end class RmgAnalyzer