Goodman-lab / DP5

Python workflow for DP5 and DP4 analysis of organic molecules
Other
175 stars 102 forks source link

Error during calculating DP5 probabilities #54

Closed whe280 closed 3 years ago

whe280 commented 3 years ago

Hello, I'm having some problems running DP5.

The command I used is : python3 PyDP4.py -s chloroform -w mnsw -m t -f mmff S1a_ S1b_ S1_NMR

S1a.sdf, S1b.sdf and S1_NMR were downloaded from : (https://www.repository.cam.ac.uk/handle/1810/326663)

Error occurred: Calculating DP5 probabilities... Traceback (most recent call last): File "PyDP4.py", line 835, in main(settings) File "PyDP4.py", line 501, in main DP5data = DP5.UnPickle_res(DP5data, settings) File "/home/node0/work/whe/DP5-master/DP5.py", line 386, in UnPickle_res data_dic = pickle.load(open(Path(Settings.OutputFolder) / "dp5" / "data_dic.p","rb")) FileNotFoundError: [Errno 2] No such file or directory: 'dp5/data_dic.p'

Could you please give me some advice?Any assistance will be appreciated.

HowarthA commented 3 years ago

Sorry its taken me a while to get to this. in the folder with the input files, if there is a folder labelled "dp5" remove this and rerun the code.

whe280 commented 3 years ago

Sorry its taken me a while to get to this. in the folder with the input files, if there is a folder labelled "dp5" remove this and rerun the code.

Thanks a lot! I removed “dp5” and ran the code again. And error occurred:

Calculating DP5 probabilities... Traceback (most recent call last): File "PyDP4.py", line 835, in main(settings) File "PyDP4.py", line 494, in main DP5data = DP5.BoltzmannWeight_DP5(Isomers, DP5data) File "/home/node0/work/whe/DP5-master/DP5.py", line 318, in BoltzmannWeight_DP5 B_scaled_probs = [0] * len(scaled_probs[0]) IndexError: list index out of range

HowarthA commented 3 years ago

could you try this without the "-m t" tinker option? These calculations were all run with MacroModel

whe280 commented 3 years ago

could you try this without the "-m t" tinker option? These calculations were all run with MacroModel

Sorry, due to some irresistible reasons, I cannot install MacroModel. The previous calculations were all run with Tinker and DP4-AI ran completed successfully. I want to know if it is possible to use Tinker to calculate the DP5 probability?Thanks a lot!

HowarthA commented 3 years ago

Yes, thats fine DP5 can use tinker for the calculations. All of the examples in the paper have been run with macromodel, if you remove the -m t option, DP5 will read in the calculations that are already there. I'm trying to gauge if this is a tinker issue or a more general issue. Also I've updated DP5 a couple of times since this issue was posted, please make sure you've got the latest version for debugging :)

whe280 commented 3 years ago

Thanks! I got the latest version ,removed “dp5” and ran the code without the "-m t".

The command I used is : python3 PyDP4.py -s chloroform -w mnsw -f mmff S1a_ S1b_ S1_NMR

The result is as follows .

Settings read from settings.cfg: SCHRODINGER: not-installed TinkerPath: /home/node0/work/whe/tinker/ NWChemPath: nwchem GausPath: g16 ['S1a', 'S1b'] S1_NMR NMR_path /home/node0/work/whe/DP5-master/S1NMR Current working directory: /home/node0/work/whe/DP5-master Initial input files: ['S1a', 'S1b_'] NMR file: [PosixPath('/home/node0/work/whe/DP5-master/S1NMR')] Workflow: mnsw Generated input files: ['S1a', 'S1b_']

Assuming all computations are done? ... False Using preexisting DFT data? ... False MacroModel

Setting up MacroModel files... Macromodel input for S1a prepared. Macromodel input for S1b prepared. MacroModel inputs: ['S1a.mae', 'S1b.mae'] Running MacroModel... MacroModel.py, RunMacroModel: Could not find MacroModel executable at not-installed/bmin Valid S1a.log exists, skipping... Valid S1b.log exists, skipping...

Reading conformers... S1a.log is matching conformational search output for S1a S1b.log is matching conformational search output for S1b Energy window: 10.0 kJ/mol S1a: 2 conformers read within energy window S1b: 3 conformers read within energy window

Pruning conformers... S1a: 2 conformers after pruning with 0A RMSD cutoff S1b: 3 conformers after pruning with 0A RMSD cutoff

Setting up NMR calculations...

Running NMR calculations...

Running Gaussian DFT NMR calculations locally... There were no jobs to run.

Reading data from the output files... S1a_ginp001.out 42 S1a_ginp002.out 42 S1b_ginp001.out 42 S1b_ginp002.out 42 S1bginp003.out 42 Shieldings: S1a: [161.1024, 146.9721, 148.3545, 132.9866, 116.3453, 105.4823, 151.6979, 159.1417, 136.2105, 155.8352, 137.6312, 164.1974, 158.0735, 241.5976, 159.5399, 29.6996, 171.4968, 30.4852, 30.668, 30.5252, 30.2133, 29.7558, 30.4467, 30.4208, 29.9095, 30.3435, 30.1375, 30.6888, 29.6078, 31.2188, 31.4595, 31.152, 31.5317, 32.0396, 31.0735, 31.0512, 30.9118, 31.2009, 31.069, 31.0364, 31.1321, 30.6794] [159.1858, 147.1349, 148.2367, 133.5074, 117.0009, 106.0555, 148.4697, 159.2834, 136.2136, 155.9559, 137.6157, 163.3728, 158.1703, 236.5075, 158.9026, 29.7363, 171.3767, 30.2611, 30.4385, 30.5404, 30.2307, 29.755, 30.2962, 30.8293, 29.9106, 30.3607, 30.1302, 30.7211, 30.978, 31.5301, 29.829, 31.0718, 31.5343, 32.148, 30.7625, 31.3746, 30.8219, 31.1805, 31.0598, 31.0194, 31.116, 30.7053] S1b: [155.4487, 140.851, 107.6673, 152.8384, 156.9952, 145.6893, 157.1007, 161.1138, 144.8176, 160.5255, 166.4586, 141.8641, 163.9302, 160.7398, 249.558, 30.5449, 168.4512, 30.0189, 30.3508, 30.5667, 30.6794, 30.6343, 29.8979, 30.9731, 30.7026, 30.155, 30.8529, 30.6405, 30.747, 30.8812, 30.7037, 31.8518, 31.5964, 31.0706, 30.6405, 30.3858, 31.3744, 31.5117, 31.7134, 31.2168, 31.3052, 31.2519] [155.4185, 140.8157, 107.752, 151.5429, 156.7604, 145.2063, 157.1094, 161.0237, 144.8893, 160.4384, 168.2306, 142.8127, 163.3799, 160.8611, 259.9965, 30.5064, 168.4251, 30.1031, 30.8787, 30.215, 30.5905, 30.6481, 29.9747, 31.0351, 30.7307, 30.1488, 30.8838, 30.6062, 30.7479, 31.3888, 30.9269, 31.7282, 31.5894, 30.8308, 30.5935, 31.6374, 30.4681, 30.8385, 32.5512, 31.2311, 31.2959, 31.2693] [155.5285, 140.9904, 107.2757, 155.4832, 157.0919, 145.5415, 157.4547, 161.4075, 145.4236, 160.6533, 166.4463, 141.8431, 163.7025, 162.1457, 272.0242, 30.5432, 168.406, 30.0292, 30.3639, 30.3507, 30.6408, 30.5813, 30.5919, 30.9146, 30.7188, 30.2504, 30.8483, 30.6098, 30.7795, 31.1797, 30.6959, 31.8879, 30.7999, 30.5594, 31.6241, 31.0784, 30.8581, 31.4703, 31.2035, 31.2051, 31.3016, 31.2575] Energies: S1a: [-662.465039733, -662.464114465] S1b_: [-662.476190143, -662.476783101, -662.476240931]

Setting TMS computational NMR shielding constant references Setting TMS references to 188.452125 and 32.1243166667

Converting DFT data to NMR shifts... WARNING: NMR shift calculation currently ignores the instruction to exclude atoms from analysis C shifts for isomer 0: 27.878, 41.443, 40.137, 55.334, 71.941, 82.829, 37.642, 29.277, 52.251, 32.590, 50.835, 24.484, 30.358, 29.092, 16.991 H shifts for isomer 0: 2.415, 1.700, 1.519, 1.595, 1.906, 2.369, 1.719, 1.592, 2.215, 1.776, 1.989, 1.427, 2.143, 0.821, 1.110, 0.994, 0.592, 0.055, 1.136, 0.985, 1.237, 0.929, 1.058, 1.093, 0.997, 1.438 C shifts for isomer 1: 33.003, 47.589, 80.865, 35.528, 31.549, 43.041, 31.258, 27.308, 43.446, 27.939, 21.156, 46.150, 24.850, 27.282, 20.029 H shifts for isomer 1: 1.598, 2.063, 1.518, 1.783, 1.498, 1.498, 2.003, 1.137, 1.404, 1.947, 1.258, 1.508, 1.368, 0.921, 1.316, 0.322, 0.745, 1.305, 1.242, 0.956, 1.321, 0.945, 0.148, 0.904, 0.825, 0.863

Reading experimental NMR data... [PosixPath('/home/node0/work/whe/DP5-master/S1_NMR')] Loading NMR data from [PosixPath('/home/node0/work/whe/DP5-master/S1_NMR')] ['75.2', '43.7', '40.1', '39.1', '37.6', '32.8', '28.2', '28.6', '28.1', '26.9', '24.6', '24.4', '20.7', '18.7'] ['2.05', '2.13', '3.43', '3.54', '2.36', '2.39', '2.19', '2.29', '1.06'] Experimental NMR description found and read. Cshifts: [75.2, 43.7, 40.1, 39.1, 37.6, 32.8, 28.2, 28.6, 28.1, 26.9, 24.6, 24.4, 20.7, 18.7] Hshifts: [2.05, 2.13, 3.43, 3.54, 2.36, 2.39, 2.19, 2.29, 1.06] Equivalents: [] Omits: []

Calculating DP5 probabilities... [[[27.354880085281195, 41.487843472264, 40.10518290694232, 55.475979566235694, 72.12041624569738, 82.98546378699477, 36.761152717347024, 29.31594965300851, 52.251471900914105, 32.62307288740967, 50.83050411651556, 24.259296716017147, 30.38435099551185, 28.91767459722791], [29.27184134070331, 41.32501278647527, 40.22300511078699, 54.955081401869734, 71.46469267319672, 82.41215574587613, 39.98996119316553, 29.174222944309072, 52.24837131660238, 32.50235013695078, 50.84600703807408, 25.084052142929927, 30.287532749907722, 29.555094720404625]], [[33.009645737884796, 47.610097223993314, 80.80005194148848, 35.62043774718688, 31.462854241740406, 42.77088526421616, 31.357334356293784, 27.343477936522024, 43.642749568897095, 27.93188882380411, 21.99767050775224, 46.596806267159245, 24.526547079916103, 27.717548430901587], [33.039851430211705, 47.64540387760722, 80.71533597658487, 36.91618193293214, 31.697698498639667, 43.253976303749134, 31.34863271645126, 27.433594919258926, 43.57103605433289, 28.01900524107806, 20.22533650764369, 45.64802746777835, 25.07695080466766, 27.596225567350146], [32.92983069657065, 47.47067094881548, 81.19172575325061, 32.975139235061, 31.36613601498505, 42.918713122690214, 31.00326763166712, 27.04972257770042, 43.03663534538369, 27.804064735082957, 22.009972826150268, 46.61781022539982, 24.7542899985531, 26.311383436120217]]] Traceback (most recent call last): File "PyDP4.py", line 835, in main(settings) File "PyDP4.py", line 494, in main DP5data = DP5.BoltzmannWeight_DP5(Isomers, DP5data) File "/home/node0/work/whe/DP5-master/DP5.py", line 328, in BoltzmannWeight_DP5 B_scaled_probs = [0] * len(scaled_probs[0]) IndexError: list index out of range

HowarthA commented 3 years ago

This problem is with the input command. This version of DP5 requires DFT optimised geometries but no geometry optimisation has been specified in the workflow command, rerun the with the workflow -w nomesw and the program will calculate DP5 probabilities as expected.