MCPcopy Create free account
hub / github.com/apple/ml-simplefold / initialize_others

Method initialize_others

src/simplefold/wrapper.py:264–291  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

262 self.af2_to_esm = af2_to_esm
263
264 def initialize_others(self):
265 # prepare data tokenizer, featurizer, and processor
266 self.tokenizer = BoltzTokenizer()
267 self.featurizer = BoltzFeaturizer()
268 self.processor = ProteinDataProcessor(
269 device=self.device,
270 scale=16.0,
271 ref_scale=5.0,
272 multiplicity=1,
273 inference_multiplicity=self.nsample_per_protein,
274 backend=self.backend,
275 )
276
277 # define flow process and sampler
278 self.flow = LinearPath()
279
280 if self.backend == "torch":
281 sampler_cls = EMSampler
282 elif self.backend == "mlx":
283 sampler_cls = EMSamplerMLX
284
285 self.sampler = sampler_cls(
286 num_timesteps=self.num_steps,
287 t_start=1e-4,
288 tau=self.tau,
289 log_timesteps=True,
290 w_cutoff=0.99,
291 )
292
293 def process_input(self, aa_seq):
294 # process fasta files to input format

Callers 1

__init__Method · 0.95

Calls 4

BoltzTokenizerClass · 0.90
BoltzFeaturizerClass · 0.90
LinearPathClass · 0.90

Tested by

no test coverage detected