-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfold.py
More file actions
27 lines (21 loc) · 953 Bytes
/
fold.py
File metadata and controls
27 lines (21 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import random
from src.config.fold_config import FoldConfig
if __name__ == "__main__":
config = FoldConfig()
random.seed(config.args.random_seed)
if config.args.solver == "SA":
from src.rna_folding.rna_folders.simulated_annealer import SimulatedAnnealer
fold = SimulatedAnnealer(config)._fold(config.seq, post_process=True)
elif config.args.solver == "MC":
from src.rna_folding.rna_folders.classical_mc import MC
fold = MC(config)._fold(config.seq, post_process=True)
elif config.args.solver == "ES":
from src.rna_folding.rna_folders.exact_solver import ExactSolver
fold = ExactSolver(config)._fold(config.seq, post_process=True)
else:
config.log.error(
"Please select a valid folder. See python fold.py -h for details."
)
raise NotImplementedError(
"Please select a valid folder. See python fold.py -h for details."
)