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
13 changes: 0 additions & 13 deletions scripts/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ def parse_args():
default=100,
help="Number of integration steps (default: 100)",
)
p.add_argument(
"--use_sc",
action="store_true",
help="Use self-conditioning during integration",
)

p.add_argument(
"--save_gifs",
Expand Down Expand Up @@ -321,7 +316,6 @@ def run_inference_batch(
graphs: list,
method: str,
num_steps: int,
use_sc: bool,
device: str,
water_ratio: float = None,
) -> list:
Expand All @@ -333,7 +327,6 @@ def run_inference_batch(
graphs: List of HeteroData graphs
method: Integration method ('euler' or 'rk4')
num_steps: Number of integration steps
use_sc: Whether to use self-conditioning
device: Device to run on
water_ratio: If provided, sample num_residues * water_ratio waters

Expand All @@ -347,7 +340,6 @@ def run_inference_batch(
results = flow_matcher.rk4_integrate(
graphs,
num_steps=num_steps,
use_sc=use_sc,
device=device,
return_trajectory=True,
water_ratio=water_ratio,
Expand All @@ -356,7 +348,6 @@ def run_inference_batch(
results = flow_matcher.euler_integrate(
graphs,
num_steps=num_steps,
use_sc=use_sc,
device=device,
water_ratio=water_ratio,
)
Expand Down Expand Up @@ -441,7 +432,6 @@ def main():
# Create FlowMatcher
flow_matcher = FlowMatcher(
model=model,
p_self_cond=config.get("p_self_cond", 0.5),
sampling_strategy=config.get("sampling_strategy", "uniform_ball"),
)

Expand Down Expand Up @@ -476,7 +466,6 @@ def main():

# run inference
logger.info(f"Running inference with method={args.method}, steps={args.num_steps}")
logger.info(f"Self-conditioning: {args.use_sc}")
logger.info(f"Threshold for metrics: {args.threshold}Å")
logger.info(f"Batch size: {args.batch_size}")

Expand Down Expand Up @@ -526,7 +515,6 @@ def main():
batch_graphs,
method=args.method,
num_steps=args.num_steps,
use_sc=args.use_sc,
device=args.device,
water_ratio=args.water_ratio,
)
Expand Down Expand Up @@ -627,7 +615,6 @@ def main():
"checkpoint": args.checkpoint,
"method": args.method,
"num_steps": args.num_steps,
"use_sc": args.use_sc,
"threshold": args.threshold,
"include_mates": include_mates,
"water_ratio": args.water_ratio,
Expand Down
14 changes: 0 additions & 14 deletions scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,6 @@ def parse_args():
)
p.add_argument("--step_gamma", type=float, default=0.5, help="StepLR gamma")

# flow matching
p.add_argument("--use_self_cond", action="store_true")
p.add_argument("--p_self_cond", type=float, default=0.5)
p.add_argument("--use_distortion", action="store_true")
p.add_argument("--p_distort", type=float, default=0.2)
p.add_argument("--t_distort", type=float, default=0.5)
p.add_argument("--sigma_distort", type=float, default=0.5)

# checkpointing
p.add_argument("--save_dir", type=str, default="/home/srivasv/flow_checkpoints")
Expand Down Expand Up @@ -680,7 +673,6 @@ def run_eval_sampling(
out = flow_matcher.rk4_integrate(
graph,
num_steps=args.rk4_steps,
use_sc=args.use_self_cond,
device=device,
return_trajectory=True,
)[0] # rk4_integrate returns a list, get the single result
Expand Down Expand Up @@ -772,7 +764,6 @@ def train_epoch(

metrics = flow_matcher.training_step(
batch,
use_self_conditioning=args.use_self_cond,
accumulation_steps=args.grad_accum_steps,
)

Expand Down Expand Up @@ -1119,12 +1110,7 @@ def main():

flow_matcher = FlowMatcher(
model=model,
p_self_cond=args.p_self_cond,
sampling_strategy=args.sampling_strategy,
use_distortion=args.use_distortion,
p_distort=args.p_distort,
t_distort=args.t_distort,
sigma_distort=args.sigma_distort,
)

optimizer = AdamW(
Expand Down
Loading
Loading