Skip to content

Commit

Permalink
Fix for issue #145
Browse files Browse the repository at this point in the history
This PR fixes the erroneous silent bail-out when the resnames of a file list are set to the basenames of the ligand pdbqt's when no such names are specified in the filelist text file.
  • Loading branch information
atillack authored Jun 9, 2021
1 parent 5335617 commit 83570ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/src/getparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,11 @@ int get_filelist(
if (filelist.ligand_files.size() != filelist.resnames.size()){
if(filelist.resnames.size()-initial_res_count>0){ // make sure correct number of resnames were specified when they were specified
printf("\nError: Inconsistent number of resnames (%lu) compared to ligands (%lu)!\n",filelist.resnames.size(),filelist.ligand_files.size());
return 1;
} else{ // otherwise add default resname (ligand basename)
for(unsigned int i=filelist.resnames.size(); i<filelist.ligand_files.size(); i++)
filelist.resnames.push_back(filelist.ligand_files[i].substr(0,filelist.ligand_files[i].size()-6));
}
return 1;
}
for(unsigned int i=initial_res_count; i<filelist.ligand_files.size(); i++){
if(filelist.mypars[i].fldfile) free(filelist.mypars[i].fldfile);
Expand Down

0 comments on commit 83570ea

Please sign in to comment.