1919@click .option ('-prot' , '--protein' , type = str , multiple = True , help = 'protein sequences' )
2020@click .option ('-rna' , '--rna' , type = str , multiple = True , help = 'single stranded rna sequences' )
2121@click .option ('-dna' , '--dna' , type = str , multiple = True , help = 'single stranded dna sequences' )
22+ @click .option ('-steps' , '--num-sample-steps' , type = int , help = 'number of sampling steps to take' )
23+ @click .option ('-cuda' , '--use-cuda' , type = bool , help = 'use cuda if available' )
2224@click .option ('-o' , '--output' , type = str , help = 'output path' , default = 'output.cif' )
2325def cli (
2426 checkpoint : str ,
2527 protein : list [str ],
2628 rna : list [str ],
2729 dna : list [str ],
30+ num_sample_steps : int ,
31+ use_cuda : bool ,
2832 output : str
2933):
3034
@@ -39,8 +43,16 @@ def cli(
3943
4044 alphafold3 = Alphafold3 .init_and_load (checkpoint_path )
4145
46+ if use_cuda and torch .cuda .is_available ():
47+ alphafold3 = alphafold3 .cuda ()
48+
4249 alphafold3 .eval ()
43- structure , = alphafold3 .forward_with_alphafold3_inputs (alphafold3_input , return_bio_pdb_structures = True )
50+
51+ structure , = alphafold3 .forward_with_alphafold3_inputs (
52+ alphafold3_input ,
53+ return_bio_pdb_structures = True ,
54+ num_sample_steps = num_sample_steps
55+ )
4456
4557 output_path = Path (output )
4658 output_path .parents [0 ].mkdir (exist_ok = True , parents = True )
0 commit comments