Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 8 additions & 6 deletions boltzdesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=DeprecationWarning)
sys.path.append(f'{os.getcwd()}/boltzdesign')

# Determine the directory where this script (boltzdesign.py) lives:
script_dir = os.path.dirname(os.path.abspath(__file__))

sys.path.append(f"{script_dir}/boltzdesign")

from boltzdesign_utils import *
from ligandmpnn_utils import *
Expand Down Expand Up @@ -280,8 +284,6 @@ def load_design_config(target_type, work_dir):
Modified so that config files are always loaded from the script's directory,
instead of using work_dir/boltzdesign/configs.
"""
# Determine the directory where this script (boltzdesign.py) lives:
script_dir = os.path.dirname(os.path.abspath(__file__))
# The configs directory is under script_dir/boltzdesign/configs/
config_dir = os.path.join(script_dir, 'boltzdesign', 'configs')

Expand Down Expand Up @@ -406,13 +408,13 @@ def run_ligandmpnn_step(args, main_dir, version_name, ligandmpnn_dir, yaml_dir,
"""Run the LigandMPNN redesign step"""
print("Starting LigandMPNN redesign step...")
# Setup LigandMPNN config
yaml_path = f"{work_dir}/LigandMPNN/run_ligandmpnn_logits_config.yaml"
yaml_path = f"{script_dir}/LigandMPNN/run_ligandmpnn_logits_config.yaml"
with open(yaml_path, "r") as f:
mpnn_config = yaml.safe_load(f)

for key, value in mpnn_config.items():
if isinstance(value, str) and "${CWD}" in value:
mpnn_config[key] = value.replace("${CWD}", work_dir)
mpnn_config[key] = value.replace("${CWD}", script_dir)

if not Path(mpnn_config["checkpoint_soluble_mpnn"]).exists():
raise FileNotFoundError("LigandMPNN checkpoint file not found!")
Expand Down
4 changes: 2 additions & 2 deletions boltzdesign/configs/default_ppi_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inter_chain_cutoff: 20.0
intra_chain_cutoff: 14.0
learning_rate: 0.1
learning_rate_pre: 1.0
length_max: 170r
length_max: 170
length_min: 90
mask_ligand: false
msa_max_seqs: 4096
Expand All @@ -33,4 +33,4 @@ soft_iteration_2: 50
temp_iteration: 45
use_temp: true
recycling_steps: 1
noise_scaling: 0.1
noise_scaling: 0.1