📄 forcefieldtests.java
字号:
46388.19337690248, -78366.91867704301, 159732.38118002846, -5725.922553802079, 7050.87656367371, 82963.08296034145, 2968.898090157819, 408.8454201640655, -13799.194492951692, 841.329623109728, -2346.595719931645, -1984.0861486649478, -7582.121048209181, 7134.835328806436, 6247.443266026296, -314.9986044458557, 1192.2591115857508, 3910.575877223779, 154526.77986227648, -210074.69670246693, -207591.68396697848, 25192.896537386798, 16255.462950070405, -39029.38728106642, -144151.80073982108, 76186.99947422123, 90648.00722994712, -31480.983720728294, 111242.89013674008, 161598.32551532952, 1397.0504535048847, 3346.90155098937, -1350.5359680333015, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -13596.223698622454, -63286.85892311394, 25192.89653803527, 14188.205288747156, -24328.794041545403, 50580.12308833832, 3767.7300089144505, 63853.467515515455, -73454.72653928083, -5756.76205276695, 20415.28389906643, -967.7571193836814, -559.3323604311873, -1604.0283795913958, 691.7104465654519, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 31333.53914067683, 5099.100592356345, 16255.462952340053, -24328.79404472696, 2110.3737460210023, -30436.002199695413, -7620.5647206287895, -1584.8390776281606, 13070.599265693543, 1175.1519857281833, -4020.606882150761, 418.2295357448376, -2333.8894383455245, -7598.435636609185, 3404.0461255095533, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3480.532568922084, -35045.66981325363, -39029.38728430877, 50580.12308898679, -30436.002197283913, 35260.620117340644, -52756.56180232125, 75615.7718945662, -1485.9165868406699, 1029.7955810252772, -2535.6642493851577, 1850.6376282992396, -6926.681670634185, -2718.9966884787905, -1238.9557626074923, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -4958.278844654196, 46388.19336036649, -144151.80073495753, 3767.7300141022138, -7620.564721196201, -52756.56180167278, 1987.6447707301681, -57419.69026185732, 132336.3659389965, 6129.585732391279, 21371.058310436296, 65810.95236024134, 2977.9491815735432, 1396.276599725966, 402.6599772627234, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1690.5794092208355, -78366.91868028537, 76186.99936462974, 63853.467514866985, -1584.8390788035133, 75615.77189489045, -57419.690259587675, 58174.56288014186, -121800.14623942792, -11102.30584603316, 20380.918277559344, -30405.284997354993, 7187.187135488463, 2579.80435236315, 1423.6338554457195, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -68702.35308276265, 159732.38127859597, 90648.00728685039, -73454.72653765966, 13070.599267071542, -1485.9165810044362, 132336.36593283602, -121800.14626180014, -24542.566560063817, 2633.526551489897, -53582.638636635806, -66043.15800187633, -81.64944707933417, -69.70750029399926, 6.930990460732019, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1430.7331251113583, -5725.922572840765, -31480.98367333929, -5756.762054651566, 1175.1519860422861, 1029.7955817041448, 6129.585735116881, -11102.305847897513, 2633.526544721487, 1139.5588915581948, 15722.783935516873, 27810.7305571014, 3813.8847032270223, 1961.8599675504342, 416.3898064003634, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -61323.010835601446, 7050.876572752295, 111242.89005260104, 20415.283896148314, -4020.6068811577907, -2535.664247601864, 21371.058308328767, 20380.918272857933, -53582.63861604687, 15722.783927856815, -25373.04793133414, -55540.97699535267, 5282.398640105757, 2564.9494251275173, 663.8239015195365, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -97936.32445269593, 82963.08307171625, 161598.32557417822, -967.7571200321518, 418.22953566377885, 1850.6376276507692, 65810.95236867145, -30405.285018754515, -66043.15799458104, 27810.730563905272, -55540.977013509844, -98069.62910876748 }; AngleBending ab = new AngleBending(); ab.setMMFF94AngleBendingParameters(molecule, mmff94Tables, true); //logger.debug("ab.functionMMFF94SumEA(moleculeCoordinates) = " + ab.functionMMFF94SumEA(moleculeCoordinates)); assertEquals(testResult_SumEA, ab.functionMMFF94SumEA(moleculeCoordinates), 0.00001); ab.set2ndOrderErrorApproximateGradientMMFF94SumEA(moleculeCoordinates); //logger.debug("ab.get2ndOrderErrorApproximateGradientMMFF94SumEA() = " + ab.get2ndOrderErrorApproximateGradientMMFF94SumEA()); for (int i = 0; i < testResult_gradientSumEA.length; i++) { assertEquals(testResult_gradientSumEA[i], ab.get2ndOrderErrorApproximateGradientMMFF94SumEA().getElement(i), 0.00001); } ab.set2ndOrderErrorApproximateHessianMMFF94SumEA(moleculeCoordinates); //logger.debug("HessianMMFF94SumEA = "); for (int i = 0; i < 24; i++) { //logger.debug(""); //logger.debug(""); for (int j = 0; j < 24; j++) { //logger.debug(ab.get2ndOrderErrorApproximateHessianMMFF94SumEA().getElement(i, j) + ", "); assertEquals(testResult_hessianSumEA[i * 24 + j], ab.get2ndOrderErrorApproximateHessianMMFF94SumEA().getElement(i, j), 0.00001); } } } /** * A unit test for JUnit (StretchBendInteraction) */ public void testStretchBendInteraction() throws ClassNotFoundException, CDKException, java.lang.Exception { //logger.debug(""); //logger.debug("FORCEFIELDTESTS with StretchBendInteraction"); double testResult_SumEBA = 1096.132616057917; double[] testResult_gradientSumEBA = {-232.43662469584442,524.0391673938808,-1874.0779288399374,-486.25278124318277,-720.7065644970131, 758.1905008692862,1034.5493204593322,-257.8988343873911,1489.817837890341,-528.9122465691897,359.7080555533199,61.6691149874617, 1952.239939601563,1746.8123237595212,-140.60603775064803,-1253.2985689229197,-1091.033422248623,112.88500346789247, -985.499642614552,-1614.601758362966,-397.1951497231564,499.610604177308,1053.681032637286,-10.683340789783628}; double[] testResult_hessianSumEBA = {1064.2077764580126, 1575.6393183074854, 1226.1412665366695, -393.947169145911, -343.837592232787, -513.9028780299227, -507.85530855179326, -772.238005499823, -388.48029580240586, -79.31812391430647, -336.2348384955319, -182.76372735139236, -83.08717484600216, -123.3288820793438, -140.9943653529483, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1575.6393183074854, 1116.967165694249, 1753.2393339810665, -343.837592232787, -220.9661639115649, -637.9755633319388, -772.238005499823, -681.1564432365352, -813.363475441418, -336.2348384955319, -148.57124553427576, -260.67348917385783, -123.3288820793438, -66.27331301187328, -41.22680603385182, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1226.1412665366695, 1753.2393339810665, 625.0887056046764, -513.9028780299227, -637.9755633319388, -216.8892563753322, -388.48029580240586, -813.363475441418, -196.63553602080208, -182.76372735139236, -260.67348917385783, -214.13351323123067, -140.9943653529483, -41.22680603385182, 2.569600022688479, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -393.947169145911, -343.837592232787, -513.9028780299227, 393.947169145911, 343.837592232787, 513.9028780299227, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -343.837592232787, -220.9661639115649, -637.9755633319388, 343.837592232787, 220.9661639115649, 637.9755633319388, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -513.9028780299227, -637.9755633319388, -216.8892563753322, 513.9028780299227, 637.9755633319388, 216.8892563753322, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -507.85530855179326, -772.238005499823, -388.48029580240586, 0.0, 0.0, 0.0, 507.85530855179326, 772.238005499823, 388.48029580240586, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -772.238005499823, -681.1564432365352, -813.363475441418, 0.0, 0.0, 0.0, 772.238005499823, 681.1564432365352, 813.363475441418, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -388.48029580240586, -813.363475441418, -196.63553602080208, 0.0, 0.0, 0.0, 388.48029580240586, 813.363475441418, 196.63553602080208, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -79.31812391430647, -336.2348384955319, -182.76372735139236, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 79.31812391430647, 336.2348384955319, 182.76372735139236, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -336.2348384955319, -148.57124553427576, -260.67348917385783, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 336.2348384955319, 148.57124553427576, 260.67348917385783, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -182.76372735139236, -260.67348917385783, -214.13351323123067, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 182.76372735139236, 260.67348917385783, 214.13351323123067, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -83.08717484600216, -123.3288820793438, -140.9943653529483, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 546.7114953969686, 811.0439170434668, 1066.7352501510989, -265.47621611669643, -192.52635084559526, -293.26664098187786, -185.68048777681068, -286.8449832142811, -301.4065393757353, -12.467616657459397, -208.3437009042466, -331.0677044405373, -123.3288820793438, -66.27331301187328, -41.22680603385182, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 811.0439170434668, 475.51900857408253, 1052.1740189955967, -192.52635084559526, 211.39975500735378, -346.4029625990998, -286.8449832142811, -358.75709442886864, -369.10808013399856, -208.3437009042466, -261.88835614069444, -295.4361702286467, -140.9943653529483, -41.22680603385182, 2.569600022688479, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1066.7352501510989, 1052.1740189955967, 922.4192564573183, -293.26664098187786, -346.4029625990998, -273.0242327467457, -301.4065393757353, -369.10808013399856, -378.8529988795061, -331.0677044405373, -295.4361702286467, -273.11162485375485, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -265.47621611669643, -192.52635084559526, -293.26664098187786, 265.47621611669643, 192.52635084559526, 293.26664098187786, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -192.52635084559526, 211.39975500735378, -346.4029625990998, 192.52635084559526, -211.39975500735378, 346.4029625990998, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -293.26664098187786, -346.4029625990998, -273.0242327467457, 293.26664098187786, 346.4029625990998, 273.0242327467457, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -185.68048777681068, -286.8449832142811, -301.4065393757353, 0.0, 0.0, 0.0, 185.68048777681068, 286.8449832142811, 301.4065393757353, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -286.8449832142811, -358.75709442886864, -369.10808013399856, 0.0, 0.0, 0.0, 286.8449832142811, 358.75709442886864, 369.10808013399856, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -301.4065393757353, -369.10808013399856, -378.8529988795061, 0.0, 0.0, 0.0, 301.4065393757353, 369.10808013399856, 378.8529988795061, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -12.467616657459397, -208.3437009042466, -331.0677044405373, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 12.467616657459397, 208.3437009042466, 331.0677044405373, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -208.3437009042466, -261.88835614069444, -295.4361702286467, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 208.3437009042466, 261.88835614069444, 295.4361702286467, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -331.0677044405373, -295.4361702286467, -273.11162485375485, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 331.0677044405373, 295.4361702286467, 273.11162485375485}; StretchBendInteractions sbi = new StretchBendInteractions(); sbi.setMMFF94StretchBendParameters(molecule, mmff94Tables, false); sbi.setFunctionMMFF94SumEBA(moleculeCoordinates); //logger.debug("sbi.getFunctionMMFF94SumEBA() = " + sbi.getFunctionMMFF94SumEBA()); assertEquals(testResult_SumEBA, sbi.getFunctionMMFF94SumEBA(), 0.00001); sbi.set2ndOrderErrorApproximateGradientMMFF94SumEBA(moleculeCoordinates); //logger.debug("sbi.get2ndOrderErrorApproximateGradientMMFF94SumEBA() = " + sbi.get2ndOrderErrorApproximateGradientMMFF94SumEBA()); for (int i = 0; i < testResult_gradientSumEBA.length; i++) { assertEquals(testResult_gradientSumEBA[i], sbi.get2ndOrderErrorApproximateGradientMMFF94SumEBA().getElement(i), 0.00001); } sbi.setHessianMMFF94SumEBA(moleculeCoordinates); //logger.debug("HessianMMFF94SumEBA = "); for (int i = 0; i < 24; i++) { //logger.debug(""); //logger.debug(""); for (int j = 0; j < 24; j++) { //logger.debug(sbi.getHessianMMFF94SumEBA().getElement(i, j) + ", "); assertEquals(testResult_hessianSumEBA[i * 24 + j], sbi.getHessianMMFF94SumEBA().getElement(i, j), 0.00001); } } } public IAtomContainer coordinateScrambler(IAtomContainer molecule, int min, double positiveShift, double negativeShift) { double nPertubatedAtoms = min + Math.random() * molecule.getAtomCount(); double coord = 0.0; logger.debug("Number of pertubated Atoms:" + nPertubatedAtoms); for (int i = 0; i < nPertubatedAtoms; i++) { coord = Math.random(); Point3d coordinate = molecule.getAtom(i).getPoint3d(); if (coord <= 0.33) { if (Math.random() <= 0.) { coordinate.x += positiveShift; } else { coordinate.x -= negativeShift;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -