-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.9.3
- Loading branch information
Showing
58 changed files
with
864 additions
and
663 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[project] | ||
name = "sevenn" | ||
version = "0.9.3" | ||
authors = [ | ||
{ name="Yutack Park", email="parkyutack@snu.ac.kr" }, | ||
{ name="Jaesun Kim" }, | ||
] | ||
description = "Scalable EquiVariance Enabled Neural Network" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Operating System :: POSIX :: Linux", | ||
] | ||
dependencies = [ | ||
"ase", | ||
"braceexpand", | ||
"pyyaml", | ||
"e3nn", | ||
"tqdm", | ||
"scikit-learn", | ||
"torch_geometric", | ||
"numpy<2.0", | ||
] | ||
|
||
|
||
[project.scripts] | ||
sevenn = "sevenn.main.sevenn:main" | ||
sevenn_get_model = "sevenn.main.sevenn_get_model:main" | ||
sevenn_graph_build = "sevenn.main.sevenn_graph_build:main" | ||
sevenn_inference = "sevenn.main.sevenn_inference:main" | ||
sevenn_patch_lammps = "sevenn.main.sevenn_patch_lammps:main" | ||
sevenn_preset = "sevenn.main.sevenn_preset:main" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/MDIL-SNU/SevenNet" | ||
Issues = "https://github.com/MDIL-SNU/SevenNet/issues" | ||
|
||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools>=61.0"] | ||
|
||
[tool.setuptools.package-data] | ||
sevenn = [ | ||
"logo_ascii", | ||
"pair_e3gnn/*.cpp", | ||
"pair_e3gnn/*.h", | ||
"pair_e3gnn/patch_lammps.sh", | ||
"presets/*.yaml", | ||
"pretrained_potentials/SevenNet_0__11July2024/checkpoint_sevennet_0.pth", | ||
"pretrained_potentials/SevenNet_0__22May2024/checkpoint_sevennet_0.pth" | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["sevenn*"] | ||
exclude = ["tests*", "example_inputs*", ] |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import argparse | ||
import os | ||
import subprocess | ||
|
||
from torch import __version__ | ||
|
||
from sevenn._const import SEVENN_VERSION | ||
|
||
# python wrapper of patch_lammps.sh script | ||
# importlib.resources is correct way to do these things | ||
# but it changes so frequently to use | ||
pair_e3gnn_dir = os.path.abspath(f'{os.path.dirname(__file__)}/../pair_e3gnn') | ||
|
||
description = ( | ||
f'sevenn version={SEVENN_VERSION}, patch LAMMPS for pair_e3gnn styles' | ||
) | ||
|
||
|
||
def main(args=None): | ||
lammps_dir = cmd_parse_main(args) | ||
cxx_standard = '17' if __version__.startswith('2') else '14' | ||
if cxx_standard == '17': | ||
print('Torch version >= 2.0 detacted, use CXX STANDARD 17') | ||
else: | ||
print('Torch version < 2.0 detacted, use CXX STANDARD 14') | ||
script = f'{pair_e3gnn_dir}/patch_lammps.sh' | ||
cmd = f'{script} {lammps_dir} {cxx_standard}' | ||
res = subprocess.run(cmd.split()) | ||
return res.returncode # is it meaningless? | ||
|
||
|
||
def cmd_parse_main(args=None): | ||
ag = argparse.ArgumentParser(description=description) | ||
ag.add_argument('lammps_dir', help='Path to LAMMPS source', type=str) | ||
args = ag.parse_args() | ||
return args.lammps_dir | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import os | ||
import argparse | ||
|
||
import sevenn._const as _const | ||
|
||
description_preset = ( | ||
f'sevenn version={_const.SEVENN_VERSION}, sevenn_preset.' | ||
+ ' copy paste preset training yaml file to current directory' | ||
+ ' ex) sevennet_preset fine_tune > my_input.yaml' | ||
) | ||
|
||
preset_help = "Name of preset" | ||
|
||
|
||
def main(args=None): | ||
preset = cmd_parse_preset(args) | ||
prefix = os.path.abspath(f'{os.path.dirname(__file__)}/../presets') | ||
|
||
with open(f"{prefix}/{preset}.yaml", "r") as f: | ||
print(f.read()) | ||
|
||
|
||
def cmd_parse_preset(args=None): | ||
ag = argparse.ArgumentParser(description=description_preset) | ||
ag.add_argument( | ||
'preset', choices=['fine_tune', 'sevennet-0', 'base'], | ||
help = preset_help | ||
) | ||
args = ag.parse_args() | ||
return args.preset |
Oops, something went wrong.