Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tonylac77/issue10 #52

Merged
merged 19 commits into from
Jul 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove terminal output
  • Loading branch information
Tonylac77 committed Jul 5, 2024
commit e844962c47295191faa9d1fa33a51a2a27787167
17 changes: 8 additions & 9 deletions scripts/docking/gnina.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ def gnina_docking(split_file: Path,
" --cnn_scoring rescore --cnn crossdock_default2018 --no_gpu")
try:
# Execute the gnina command
subprocess.call(gnina_cmd, shell=True #, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT
)
subprocess.call(gnina_cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
except Exception as e:
printlog(f"GNINA docking failed: {e}")
return
Expand All @@ -92,9 +91,9 @@ def fetch_gnina_poses(w_dir: Union[str, Path], n_poses: int, *args):
for file in tqdm(os.listdir(w_dir / "gnina"), desc="Loading GNINA poses"):
if file.startswith("split"):
df = PandasTools.LoadSDF(str(w_dir / "gnina" / file),
idName="ID",
molColName="Molecule",
strictParsing=False)
idName="ID",
molColName="Molecule",
strictParsing=False)
gnina_dataframes.append(df)
gnina_df = pd.concat(gnina_dataframes)
list_ = [*range(1, int(n_poses) + 1, 1)]
Expand All @@ -108,10 +107,10 @@ def fetch_gnina_poses(w_dir: Union[str, Path], n_poses: int, *args):
printlog(e)
try:
PandasTools.WriteSDF(gnina_df,
str(w_dir / "gnina" / "gnina_poses.sdf"),
molColName="Molecule",
idName="Pose ID",
properties=list(gnina_df.columns))
str(w_dir / "gnina" / "gnina_poses.sdf"),
molColName="Molecule",
idName="Pose ID",
properties=list(gnina_df.columns))

except Exception as e:
printlog("ERROR: Failed to write combined GNINA poses SDF file!")
Expand Down