Skip to content
Snippets Groups Projects
Commit 68ad09d3 authored by Valerio Mariani's avatar Valerio Mariani
Browse files

Fixed a problem with asking for a parameter file even without structural...

Fixed a problem with asking for a parameter file even without structural checks, set the default tolerance level to 8.0 stddev
parent f837b0bf
Branches
Tags
No related merge requests found
...@@ -210,8 +210,8 @@ int main (int argc, char **argv) ...@@ -210,8 +210,8 @@ int main (int argc, char **argv)
Real min_default_distance = 1.5; Real min_default_distance = 1.5;
Real min_distance_tolerance = 0.0; Real min_distance_tolerance = 0.0;
Real bond_tolerance = 5.0; Real bond_tolerance = 8.0;
Real angle_tolerance = 5.0; Real angle_tolerance = 8.0;
IOProfile profile; IOProfile profile;
profile.bond_feasibility_check=false; profile.bond_feasibility_check=false;
...@@ -257,7 +257,7 @@ int main (int argc, char **argv) ...@@ -257,7 +257,7 @@ int main (int argc, char **argv)
String parameter_filename; String parameter_filename;
if (vm.count("parameter-file")) { if (vm.count("parameter-file")) {
parameter_filename=vm["parameter-file"].as<String>(); parameter_filename=vm["parameter-file"].as<String>();
} else { } else if (structural_checks==true) {
std::cout << "Please specify a stereo-chemical parameter file" << std::endl; std::cout << "Please specify a stereo-chemical parameter file" << std::endl;
exit(-1); exit(-1);
} }
...@@ -284,19 +284,6 @@ int main (int argc, char **argv) ...@@ -284,19 +284,6 @@ int main (int argc, char **argv)
if (vm.count("default_clash")) { if (vm.count("default_clash")) {
min_default_distance=vm["default_clash"].as<Real>(); 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(); String ref_file=files.back();
EntityHandle ref=load(ref_file, profile); EntityHandle ref=load(ref_file, profile);
...@@ -335,6 +322,19 @@ int main (int argc, char **argv) ...@@ -335,6 +322,19 @@ int main (int argc, char **argv)
ClashingDistances nonbonded_table(min_default_distance,min_distance_tolerance); ClashingDistances nonbonded_table(min_default_distance,min_distance_tolerance);
EntityView v=model.CreateFullView(); EntityView v=model.CreateFullView();
if (structural_checks) { 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 { try {
FillStereoChemicalParams("Bond",bond_table,stereo_chemical_props); FillStereoChemicalParams("Bond",bond_table,stereo_chemical_props);
} }
...@@ -379,11 +379,13 @@ int main (int argc, char **argv) ...@@ -379,11 +379,13 @@ int main (int argc, char **argv)
for (ResidueViewIter rit=v.ResiduesBegin();rit!=v.ResiduesEnd();++rit){ for (ResidueViewIter rit=v.ResiduesBegin();rit!=v.ResiduesEnd();++rit){
ResidueView ritv = *rit; ResidueView ritv = *rit;
Real ldt_local_sum = 0; Real ldt_local_sum = 0;
for (int n=0; n<4; ++n) { if (ritv.HasProp("localldt0.5")) {
ldt_local_sum+=ritv.GetFloatProp(labels[n]); 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; 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; std::cout << std::endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment