File tree Expand file tree Collapse file tree 3 files changed +75
-4
lines changed
Expand file tree Collapse file tree 3 files changed +75
-4
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,27 @@ pub fn run(
128128 Image ( "rosettacommons/rfdiffusion" . into ( ) ) ,
129129 {
130130 //app_args.insert(0, "inference.output_prefix=/w".into()); // /motifscaffolding
131- app_args. extend ( [
132- "inference.output_prefix=/w/" . into ( ) ,
133- "inference.model_directory_path=/app/RFdiffusion/models" . into ( ) ,
134- ] ) ;
131+ app_args. splice (
132+ 0 ..0 ,
133+ [
134+ "inference.output_prefix=/w/" . into ( ) ,
135+ "inference.model_directory_path=/app/RFdiffusion/models" . into ( ) ,
136+ ] ,
137+ ) ;
135138 app_args
136139 } ,
137140 Some ( "/app/RFdiffusion/schedules" . into ( ) ) ,
138141 ) ,
142+
143+ App :: Proteinmpnn => (
144+ Image ( "rosettacommons/proteinmpnn" . into ( ) ) ,
145+ {
146+ //app_args.extend(["--out_folder=/w/".into()]);
147+ app_args. splice ( 0 ..0 , [ "--out_folder=/w/" . into ( ) ] ) ;
148+ app_args
149+ } ,
150+ None ,
151+ ) ,
139152 //_ => todo!(),
140153 } ;
141154
Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ enum App {
8585 /// Run the RFdiffusion command https://github.com/RosettaCommons/RFdiffusion
8686 #[ value( aliases = [ "Rfdiffusion" ] ) ]
8787 Rfdiffusion ,
88+
89+ /// Run the RFdiffusion command https://github.com/RosettaCommons/RFdiffusion
90+ #[ value( aliases = [ "ProteinMPNN" ] ) ]
91+ Proteinmpnn ,
8892}
8993
9094fn main ( ) -> Result < ( ) > {
Original file line number Diff line number Diff line change 1+ use assert_cmd:: { assert:: OutputAssertExt , cargo:: cargo_bin_cmd} ;
2+ use assert_fs:: TempDir ;
3+
4+ mod common;
5+
6+ common:: engine_tests!( proteinmpnn) ;
7+
8+ fn proteinmpnn ( engine : & str ) {
9+ use assert_fs:: assert:: PathAssert ;
10+
11+ let root = std:: path:: PathBuf :: from ( "target/proteinmpnn" ) . join ( engine) ;
12+ std:: fs:: create_dir_all ( & root) . expect ( "create engine testing dir" ) ;
13+ let work_dir = TempDir :: new_in ( root) . expect ( "create temp dir" ) ;
14+
15+ let pdb_id = "3htn" ;
16+ let pdb_file = pdb_id. to_string ( ) + ".pdb" ;
17+
18+ let pdb_path = work_dir. path ( ) . join ( & pdb_file) ;
19+ std:: fs:: write (
20+ pdb_path,
21+ reqwest:: blocking:: get ( format ! ( "https://files.rcsb.org/download/{pdb_file}" ) )
22+ . unwrap ( )
23+ . bytes ( )
24+ . unwrap ( ) ,
25+ )
26+ . unwrap ( ) ;
27+
28+ let cmd = cargo_bin_cmd ! ( )
29+ . args ( [
30+ "run" ,
31+ "--container-engine" ,
32+ engine,
33+ "-w" ,
34+ work_dir. path ( ) . to_str ( ) . unwrap ( ) ,
35+ "proteinmpnn" ,
36+ "--pdb_path" ,
37+ & pdb_file,
38+ "--pdb_path_chains" ,
39+ "A B" ,
40+ ] )
41+ . unwrap ( ) ;
42+ cmd. assert ( ) . success ( ) ;
43+
44+ use assert_fs:: prelude:: PathChild ;
45+
46+ work_dir
47+ . child ( ".0000.rc.log" )
48+ . assert ( predicates:: path:: exists ( ) ) ;
49+
50+ let o_pdb = work_dir. child ( "seqs/3htn.fa" ) ;
51+ o_pdb. assert ( predicates:: path:: exists ( ) ) ;
52+
53+ // std::thread::sleep(std::time::Duration::from_secs(60));
54+ }
You can’t perform that action at this time.
0 commit comments