Skip to content

Commit

Permalink
bugfix, 2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
SeonghwanSeo committed Aug 12, 2024
1 parent c1bdee0 commit 2ff2d49
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ run.sh
result/
examples/library/
nogit/
test.sh


# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
help="custom path of protein pdb file (.pdb)",
required=True,
)
self.add_argument("--out", type=str, help="save path of features (torch object)", required=True)
self.add_argument("-o", "--out", type=str, help="save path of features (torch object)", required=True)
self.add_argument(
"--ref_ligand",
type=str,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pharmaconet"
version = "2.0.2"
version = "2.0.3"
description = "PharmacoNet: Open-Source Software for Protein-based Pharmacophore Modeling and Virtual Screening"
license = { text = "MIT" }
authors = [{ name = "Seonghwan Seo", email = "shwan0106@kaist.ac.kr" }]
Expand Down
2 changes: 1 addition & 1 deletion src/pmnet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .pharmacophore_model import PharmacophoreModel

__version__ = "2.0.2"
__version__ = "2.0.3"
__citation_information__ = (
"Seo, S., & Kim, W. Y. (2023, December). "
"PharmacoNet: Accelerating Large-Scale Virtual Screening by Deep Pharmacophore Modeling. "
Expand Down
2 changes: 1 addition & 1 deletion src/pmnet/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_center(
extension = os.path.splitext(ref_ligand_path)[1]
assert extension in [".sdf", ".pdb", ".mol2"]
ref_ligand = next(pybel.readfile(extension[1:], str(ref_ligand_path)))
x, y, z = np.mean([atom.coords for atom in ref_ligand.atoms], axis=0, dtype=np.float32).to_list()
x, y, z = np.mean([atom.coords for atom in ref_ligand.atoms], axis=0, dtype=np.float32).tolist()
return float(x), float(y), float(z)

@torch.no_grad()
Expand Down
3 changes: 2 additions & 1 deletion src/pmnet/pharmacophore_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def create(
center = (x, y, z)
graph = DensityMapGraph(center, resolution, size)
for node in hotspot_infos:
graph.add_node(node["type"], node["position"], node["score"], node["map"])
x, y, z = tuple(node["hotspot_position"].tolist())
graph.add_node(node["nci_type"], (x, y, z), float(node["hotspot_score"]), node["point_map"])
graph.setup()

model = cls()
Expand Down
8 changes: 8 additions & 0 deletions test/maintain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/bin/rm -rf result/6oim
python modeling.py --cuda --pdb 6oim
python modeling.py --cuda --pdb 6oim --ref_ligand ./result/6oim/6oim_B_MG.pdb
python modeling.py --cuda --protein ./result/6oim/6oim.pdb --prefix 6oim
python modeling.py --cuda --protein ./result/6oim/6oim.pdb --ref_ligand ./result/6oim/6oim_B_MG.pdb --prefix 6oim
python modeling.py --cuda --protein ./result/6oim/6oim.pdb --center 1.872 -8.260 -1.361 --prefix 6oim
python screening.py -p ./result/6oim/6oim_D_MOV_model.pm -d ./examples/library/ --cpus 4 -o tmp.csv
python feature_extraction.py --cuda -p ./result/6oim/6oim.pdb --center 1.872 -8.260 -1.361 -o tmp.pt

0 comments on commit 2ff2d49

Please sign in to comment.