-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating resources with new classes from aiidalab-qe (#111)
- Loading branch information
1 parent
fbb0075
commit c351153
Showing
2 changed files
with
32 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,41 @@ | ||
from aiidalab_qe.common.code.model import CodeModel, PwCodeModel | ||
from aiidalab_qe.common.panel import ResourceSettingsModel, ResourceSettingsPanel | ||
from aiidalab_qe.common.panel import ( | ||
PluginResourceSettingsModel, | ||
PluginResourceSettingsPanel, | ||
) | ||
|
||
|
||
class VibroResourceSettingsModel(ResourceSettingsModel): | ||
class VibroResourceSettingsModel(PluginResourceSettingsModel): | ||
"""Resource settings for the vibroscopy calculations.""" | ||
|
||
codes = { | ||
"phonon": PwCodeModel( | ||
description="pw.x for phonons", | ||
default_calc_job_plugin="quantumespresso.pw", | ||
), | ||
"dielectric": PwCodeModel( | ||
description="pw.x for dielectric", | ||
default_calc_job_plugin="quantumespresso.pw", | ||
), | ||
"phonopy": CodeModel( | ||
name="phonopy", | ||
description="phonopy", | ||
default_calc_job_plugin="phonopy.phonopy", | ||
), | ||
} | ||
identifier = "vibronic" | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.add_models( | ||
{ | ||
"phonon": PwCodeModel( | ||
name="phonon", | ||
description="pw.x for phonons", | ||
default_calc_job_plugin="quantumespresso.pw", | ||
), | ||
"dielectric": PwCodeModel( | ||
name="dielectric", | ||
description="pw.x for dielectric", | ||
default_calc_job_plugin="quantumespresso.pw", | ||
), | ||
"phonopy": CodeModel( | ||
name="phonopy", | ||
description="phonopy", | ||
default_calc_job_plugin="phonopy.phonopy", | ||
), | ||
} | ||
) | ||
|
||
class VibroResourcesSettingsPanel(ResourceSettingsPanel[VibroResourceSettingsModel]): | ||
|
||
class VibroResourcesSettingsPanel( | ||
PluginResourceSettingsPanel[VibroResourceSettingsModel] | ||
): | ||
"""Panel for the resource settings for the vibroscopy calculations.""" | ||
|
||
title = "Vibronic" | ||
identifier = identifier = "vibronic" |