Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
Tests were failing due to absence of simulation path parent, meaning
lightdock was looking for receptor and ligand pdbs in the root /
  • Loading branch information
wjs20 committed Apr 15, 2024
1 parent fc77b2d commit fdec6c4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/bin/lightdock-rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,21 @@ fn simulate(simulation_path: &str, setup: &SetupFile, swarm_filename: &str, step
println!("Reading starting positions from {:?}", swarm_filename);
let positions = parse_input_coordinates(swarm_filename);

let receptor_filename = if simulation_path == "" {
format!("{}{}", DEFAULT_LIGHTDOCK_PREFIX, setup.receptor_pdb)
} else {
format!("{}/{}{}", simulation_path, DEFAULT_LIGHTDOCK_PREFIX, setup.receptor_pdb)
};
// Parse receptor input PDB structure
let receptor_filename: String = format!("{}/{}{}", simulation_path, DEFAULT_LIGHTDOCK_PREFIX, setup.receptor_pdb);
println!("Reading receptor input structure: {}", receptor_filename);
let (receptor, _errors) = pdbtbx::open(&receptor_filename, pdbtbx::StrictnessLevel::Medium).unwrap();

let ligand_filename = if simulation_path == "" {
format!("{}{}", DEFAULT_LIGHTDOCK_PREFIX, setup.ligand_pdb)
} else {
format!("{}/{}{}", simulation_path, DEFAULT_LIGHTDOCK_PREFIX, setup.ligand_pdb)
};
// Parse ligand input PDB structure
let ligand_filename: String = format!("{}/{}{}", simulation_path, DEFAULT_LIGHTDOCK_PREFIX, setup.ligand_pdb);
println!("Reading ligand input structure: {}", ligand_filename);
let (ligand, _errors) = pdbtbx::open(&ligand_filename, pdbtbx::StrictnessLevel::Medium).unwrap();

Expand Down

0 comments on commit fdec6c4

Please sign in to comment.