1- import os
1+ import os , sys
22ENV = {"TF_FORCE_UNIFIED_MEMORY" :"1" , "XLA_PYTHON_CLIENT_MEM_FRACTION" :"4.0" }
33for k ,v in ENV .items ():
44 if k not in os .environ : os .environ [k ] = v
1313from pathlib import Path
1414import random
1515
16- from colabfold .run_alphafold import run
16+ from colabfold .run_alphafold import run , set_model_type
1717from colabfold .utils import (
1818 DEFAULT_API_SERVER , ACCEPT_DEFAULT_TERMS ,
1919 get_commit , setup_logging
@@ -136,7 +136,7 @@ def main():
136136 choices = ["auto" , "plddt" , "ptm" , "iptm" , "multimer" ],
137137 )
138138 parser .add_argument ("--pair-mode" ,
139- help = "rank models by auto, unpaired, paired, unpaired_paired" ,
139+ help = "how to generate MSA for multimeric inputs: unpaired, paired, unpaired_paired" ,
140140 type = str ,
141141 default = "unpaired_paired" ,
142142 choices = ["unpaired" , "paired" , "unpaired_paired" ],
@@ -157,12 +157,16 @@ def main():
157157 action = "store_true" ,
158158 help = "saves the pair representation embeddings of all models" ,
159159 )
160- parser .add_argument (
161- "--use-dropout" ,
160+ parser .add_argument ("--use-dropout" ,
162161 default = False ,
163162 action = "store_true" ,
164163 help = "activate dropouts during inference to sample from uncertainity of the models" ,
165164 )
165+ parser .add_argument ("--disable-masking" ,
166+ default = False ,
167+ action = "store_true" ,
168+ help = 'by default, 15% of the input MSA is randomly masked, set this flag to disable this' ,
169+ )
166170 parser .add_argument ("--max-seq" ,
167171 help = "number of sequence clusters to use" ,
168172 type = int ,
@@ -203,6 +207,9 @@ def main():
203207 parser .add_argument ("--interaction-scan" , default = False , action = "store_true" )
204208 parser .add_argument ("--disable-cluster-profile" , default = False , action = "store_true" )
205209
210+ parser .add_argument ("--cyclic" , default = False , action = "store_true" )
211+ parser .add_argument ("--save-best" , default = False , action = "store_true" )
212+
206213 # backward compatability
207214 parser .add_argument ('--training' , default = False , action = "store_true" , help = argparse .SUPPRESS )
208215 parser .add_argument ('--templates' , default = False , action = "store_true" , help = argparse .SUPPRESS )
@@ -283,12 +290,15 @@ def main():
283290 save_single_representations = args .save_single_representations ,
284291 save_pair_representations = args .save_pair_representations ,
285292 use_dropout = args .use_dropout ,
293+ use_masking = not args .disable_masking ,
286294 max_seq = args .max_seq ,
287295 max_extra_seq = args .max_extra_seq ,
288296 use_cluster_profile = not args .disable_cluster_profile ,
289- use_gpu_relax = args .use_gpu_relax ,
297+ use_gpu_relax = args .use_gpu_relax ,
290298 save_all = args .save_all ,
291299 save_recycles = args .save_recycles ,
300+ cyclic = args .cyclic ,
301+ save_best = args .save_best ,
292302 )
293303
294304 if args .interaction_scan :
0 commit comments