diff --git a/modules/mol/alg/src/ldt.cc b/modules/mol/alg/src/ldt.cc index 6a3db1c9eb23285eba281df77e44d493b54792de..82e073106c2163378f23f1afc69d58d96b5044b7 100644 --- a/modules/mol/alg/src/ldt.cc +++ b/modules/mol/alg/src/ldt.cc @@ -210,8 +210,8 @@ int main (int argc, char **argv) Real min_default_distance = 1.5; Real min_distance_tolerance = 0.0; - Real bond_tolerance = 5.0; - Real angle_tolerance = 5.0; + Real bond_tolerance = 8.0; + Real angle_tolerance = 8.0; IOProfile profile; profile.bond_feasibility_check=false; @@ -257,7 +257,7 @@ int main (int argc, char **argv) String parameter_filename; if (vm.count("parameter-file")) { parameter_filename=vm["parameter-file"].as<String>(); - } else { + } else if (structural_checks==true) { std::cout << "Please specify a stereo-chemical parameter file" << std::endl; exit(-1); } @@ -284,19 +284,6 @@ int main (int argc, char **argv) if (vm.count("default_clash")) { min_default_distance=vm["default_clash"].as<Real>(); } - boost::filesystem::path loc(parameter_filename); - boost::filesystem::ifstream infile(loc); - if (!infile) { - std::cout << "Couldn't find " << parameter_filename << std::endl; - exit(-1); - } - std::vector<String> stereo_chemical_props; - String line; - while (std::getline(infile, line)) - { - std::stringstream line_stream(line); - stereo_chemical_props.push_back(line); - } String ref_file=files.back(); EntityHandle ref=load(ref_file, profile); @@ -335,6 +322,19 @@ int main (int argc, char **argv) ClashingDistances nonbonded_table(min_default_distance,min_distance_tolerance); EntityView v=model.CreateFullView(); if (structural_checks) { + boost::filesystem::path loc(parameter_filename); + boost::filesystem::ifstream infile(loc); + if (!infile) { + std::cout << "Couldn't find " << parameter_filename << std::endl; + exit(-1); + } + std::vector<String> stereo_chemical_props; + String line; + while (std::getline(infile, line)) + { + std::stringstream line_stream(line); + stereo_chemical_props.push_back(line); + } try { FillStereoChemicalParams("Bond",bond_table,stereo_chemical_props); } @@ -379,11 +379,13 @@ int main (int argc, char **argv) for (ResidueViewIter rit=v.ResiduesBegin();rit!=v.ResiduesEnd();++rit){ ResidueView ritv = *rit; Real ldt_local_sum = 0; - for (int n=0; n<4; ++n) { - ldt_local_sum+=ritv.GetFloatProp(labels[n]); - } - ldt_local_sum/=4.0; - std::cout << ritv.GetChain() << "\t" << ritv.GetName() << "\t" << ritv.GetNumber() << '\t' << ldt_local_sum << std::endl; + if (ritv.HasProp("localldt0.5")) { + for (int n=0; n<4; ++n) { + ldt_local_sum+=ritv.GetFloatProp(labels[n]); + } + ldt_local_sum/=4.0; + std::cout << ritv.GetChain() << "\t" << ritv.GetName() << "\t" << ritv.GetNumber() << '\t' << ldt_local_sum << std::endl; + } } std::cout << std::endl; }