Small fix to OpenMM torsion assignment#19
Conversation
Fix OpenMM torsion assignment for amoebabio09 FF (for nucleic acids). The 4-, 5-, and 6-fold torsions were not being added to the OpenMM System, and torsions with these periodicities were defined for some nucleic acid systems. This commit makes sure that those torsions are correctly added and adjusts the behavior of adding torsions such that only torsions with non-zero force constants actually get added. This reduces the number of "useless" terms in the resulting OpenMM System and makes debugging easier. I also added a protective #ifdef __INTEL_COMPILER around the ifort-specific OpenMP directives so that you don't have to keep changing the source code to compile with ifort or gfortran.
|
Paul Nerenberg says that this change is okay with you, @jayponder, so I'm going to go ahead and merge it. |
Small fix to OpenMM torsion assignment
|
I didn't say this! (It would be good to hear from @jayponder on this issue.) But I do agree that these are necessary changes for successful nucleic acid simulations. And the compiler check is a common sense item. |
|
@swails I just tried re-compiling on Stampede with gcc 4.9.1 and that #ifdef statement doesn't work. First there is a warning:
And then an error:
|
|
Yea, yea... I know. I found that out when I tried compiling it the other day. The problem is that C preprocessor directives are not processed on I'll add it to my to-do list if @jayponder likes the idea. |
I completely forget the context here. Sorry for throwing you under the bus if that's what happened... In any case, I merged this a long time ago and it only affects OpenMM (and fixes a bug). |
Fix OpenMM torsion assignment for amoebabio09 FF (for nucleic acids). The 4-,
5-, and 6-fold torsions were not being added to the OpenMM System, and torsions
with these periodicities were defined for some nucleic acid systems. This commit
makes sure that those torsions are correctly added and adjusts the behavior of
adding torsions such that only torsions with non-zero force constants actually
get added. This reduces the number of "useless" terms in the resulting OpenMM
System and makes debugging easier.
I also added a protective
#ifdef __INTEL_COMPILERaround the ifort-specificOpenMP directives so that you don't have to keep changing the source code to
compile with ifort or gfortran.