-
Notifications
You must be signed in to change notification settings - Fork 876
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
99 additions
and
100 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
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
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 |
---|---|---|
|
@@ -37,6 +37,9 @@ | |
__email__ = "[email protected], [email protected]" | ||
__date__ = "Nov 2022" | ||
|
||
module_dir = os.path.dirname(os.path.abspath(__file__)) | ||
template_dir = f"{module_dir}/templates" | ||
|
||
|
||
class LammpsInputFile(InputFile): | ||
""" | ||
|
@@ -868,8 +871,6 @@ class LammpsRun(MSONable): | |
templates. | ||
""" | ||
|
||
template_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates") | ||
|
||
def __init__(self, script_template: str, settings: dict, data: LammpsData | str, script_filename: str) -> None: | ||
""" | ||
Base constructor. | ||
|
@@ -931,7 +932,7 @@ def md( | |
other_settings (dict): other settings to be filled into | ||
placeholders. | ||
""" | ||
template_path = os.path.join(cls.template_dir, "md.template") | ||
template_path = os.path.join(template_dir, "md.template") | ||
with open(template_path) as f: | ||
script_template = f.read() | ||
settings = other_settings.copy() if other_settings else {} | ||
|
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