Spaces:
Runtime error
Runtime error
Add license
Browse filesRemove "-" from env variable, was causing issues.
- LICENSE +21 -0
- run_utils.py +5 -5
LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2023 Michael Plainer, Marcella Toth, Simon Dobers, Hannes Stärk, Gabriele Corso, Jacob Silterra
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
run_utils.py
CHANGED
@@ -13,12 +13,12 @@ ARG_ORDER = ["samples_per_complex", "keep_local_structures", "save_visualisation
|
|
13 |
|
14 |
|
15 |
def set_env_variables():
|
16 |
-
if "
|
17 |
work_dir = os.path.abspath(os.path.join("../DiffDock-Pocket"))
|
18 |
if os.path.exists(work_dir):
|
19 |
-
os.environ["
|
20 |
else:
|
21 |
-
raise ValueError(f"
|
22 |
|
23 |
if "LOG_LEVEL" not in os.environ:
|
24 |
os.environ["LOG_LEVEL"] = "INFO"
|
@@ -74,7 +74,7 @@ def run_cli_command(
|
|
74 |
):
|
75 |
if work_dir is None:
|
76 |
work_dir = os.environ.get(
|
77 |
-
"
|
78 |
)
|
79 |
|
80 |
assert len(args) == len(ARG_ORDER), f'Expected {len(ARG_ORDER)} arguments, got {len(args)}'
|
@@ -166,7 +166,7 @@ def main_test():
|
|
166 |
configure_logging()
|
167 |
|
168 |
work_dir = os.path.abspath("../DiffDock-Pocket")
|
169 |
-
os.environ["
|
170 |
protein_path = os.path.join(work_dir, "example_data", "3dpf_protein.pdb")
|
171 |
ligand = os.path.join(work_dir, "example_data", "3dpf_ligand.sdf")
|
172 |
other_arg_file = os.path.join(work_dir, "example_data", "example_args.yml")
|
|
|
13 |
|
14 |
|
15 |
def set_env_variables():
|
16 |
+
if "DiffDockPocketDir" not in os.environ:
|
17 |
work_dir = os.path.abspath(os.path.join("../DiffDock-Pocket"))
|
18 |
if os.path.exists(work_dir):
|
19 |
+
os.environ["DiffDockPocketDir"] = work_dir
|
20 |
else:
|
21 |
+
raise ValueError(f"DiffDockPocketDir {work_dir} not found")
|
22 |
|
23 |
if "LOG_LEVEL" not in os.environ:
|
24 |
os.environ["LOG_LEVEL"] = "INFO"
|
|
|
74 |
):
|
75 |
if work_dir is None:
|
76 |
work_dir = os.environ.get(
|
77 |
+
"DiffDockPocketDir", os.path.join(os.environ["HOME"], "DiffDock-Pocket")
|
78 |
)
|
79 |
|
80 |
assert len(args) == len(ARG_ORDER), f'Expected {len(ARG_ORDER)} arguments, got {len(args)}'
|
|
|
166 |
configure_logging()
|
167 |
|
168 |
work_dir = os.path.abspath("../DiffDock-Pocket")
|
169 |
+
os.environ["DiffDockPocketDir"] = work_dir
|
170 |
protein_path = os.path.join(work_dir, "example_data", "3dpf_protein.pdb")
|
171 |
ligand = os.path.join(work_dir, "example_data", "3dpf_ligand.sdf")
|
172 |
other_arg_file = os.path.join(work_dir, "example_data", "example_args.yml")
|