193
193
def convert_model_to_mg4(self, model, wanted_lorentz = [],
194
194
wanted_couplings = []):
196
super(ProcessExporterFortranFKS,self).convert_model_to_mg4(model,
196
super(ProcessExporterFortranFKS,self).convert_model_to_mg4(model,
197
197
wanted_lorentz, wanted_couplings)
199
IGNORE_PATTERNS = ('*.pyc','*.dat','*.py~')
201
shutil.rmtree(pjoin(self.dir_path,'bin','internal','ufomodel'))
202
except OSError as error:
204
# Notice that what is below is not safe for path including '-'.
205
shutil.copytree(model.get('version_tag').split('##')[0].split('-')[0],
199
IGNORE_PATTERNS = ('*.pyc','*.dat','*.py~')
201
shutil.rmtree(pjoin(self.dir_path,'bin','internal','ufomodel'))
202
except OSError as error:
204
model_path = model.get('modelpath')
205
shutil.copytree(model_path,
206
206
pjoin(self.dir_path,'bin','internal','ufomodel'),
207
207
ignore=shutil.ignore_patterns(*IGNORE_PATTERNS))
208
if hasattr(model, 'restrict_card'):
209
out_path = pjoin(self.dir_path, 'bin', 'internal','ufomodel',
208
if hasattr(model, 'restrict_card'):
209
out_path = pjoin(self.dir_path, 'bin', 'internal','ufomodel',
210
210
'restrict_default.dat')
211
if isinstance(model.restrict_card, check_param_card.ParamCard):
212
model.restrict_card.write(out_path)
214
files.cp(model.restrict_card, out_path)
211
if isinstance(model.restrict_card, check_param_card.ParamCard):
212
model.restrict_card.write(out_path)
214
files.cp(model.restrict_card, out_path)