Closed peonor closed 8 years ago
Eugh the torsions.
The whole check we use is a temporary fix in the 1st place. It will fail in certain cases.
Ex.) Reference angle is 176 degrees and FF angle is 174 degrees. The FF data will have one more data point than the reference data.
That being said, making another change to the code to make it work for this particular instance you bring up probably won't be that hard, but the entirety of it should be replaced soon.
Looked at this for awhile. There's not an easy way to change the code such that this works.
Structure
has no idea what file it came from, so it can't reread the .mmo---which would be a waste of time anyway---to pick up on all the angles including those that aren't flagged with OPT
.collect_structural_data_from_mae
in calculate
could be reworked to do this, but it would get messy.My advice is to mark the angles with OPT but not include them in your parameters that you are optimizing.
Another option is to remove the check completely by commenting out lines 1790 - 1841 in filetypes
and replace all of that with simply data.append(datum)
.
Another easy way out: if it didn't find the angle, the test counts as "passed". And only do the test on reference data; it's always a disaster if you should get different outcomes for FF and test. Or maybe rethink the entire concept... The major reason we have the test is to avoid mismatch, if the angle gets close to linear and MacroModel fails to output the torsion. By testing in the reference, we exclude the ones that could come close to linear. But if we're that close to start with, the torsion should have all-zero parameters in the first place... Maybe this should only be a warning, printed at the start, based on ref. data only? The thing we'd really need is on another level; for each bunch of data, whatever the type, if we have a mismatch in number of data points between reference and FF, it should always break with an informative warning. Is that test in the code right now?
Something wrong in my analysis. I made the angle OPT, still got an identical error, even though I see that the angle is now OPT in the mmo file. Something else is going on. I think I'll just comment out those lines in filetypes and see what happens.
The easy way out suggestion you offered is pretty simple. Adding...
Okay, changes made.
Do we want to leave this open until someone rewrites the torsional code? Or just close it?
Close, can always reopen if needed...
Yet another... I get a crash when torsions to be optimized contain angles which are not optimized. You can see the error message here: tmp.txt It's crashing on the fourth structure in the following mmo file: tmp_mmo.txt As you can see, the angle value is in there, but it's not marked with OPT...