Hello Community!
I am using openbabel for conformer generation - my (intended) workflow is:
Guess a rough geometry using --gen3d, perform a weighted rotor search (obabel with --conformer --weighted etc.), take the lowest energy conformer and optimize with obminimize.
I understand, that the weighted rotor search not necessarily finds a lower energy conformer, but isn't obabel supposed to keep the initial geometry if it does not find a conformer with lower energy?
Sometimes, when I run obabel from the command line with the --conformer flag (basically the same way as in the code below), a lowest energy value is reported, but when I check afterwards using obenergy, the molecule hasn't been updated to the coordinates yielding the lowest energy value. Sometimes it works though.
Any ideas what is wrong here?
Help and hints would be highly appreciated.
Best regards, greetings from Paris
Heiner Atze
Centre de Recherche des Cordeliers UMRS 1138 - Equipe 12
-----------------
Example output from code below, with weird results:
12_prod_O.mol
Generating initial geometry...
TOTAL ENERGY = 48.04048 kcal/mol
Conformer generation...
TOTAL ENERGY = 5837.90939 kcal/mol
Energy minimization with Steepest descent...
TOTAL ENERGY = 2513.96133 kcal/mol
Energy minimization with Conjugate gradient...
TOTAL ENERGY = 2513.95416 kcal/mol
Completed
for file in mol_files:
print(file)
print('Generating initial geometry...')
#guessing initial geometry, preliminary optimization and writing to mol_file
call('obabel -imol %s -omol -O %s --gen3d' % (file, file), shell = True)
energy = !obenergy {file}
print(energy[-1])
print('Conformer generation...')
#weighted rotor search to find a low-energy conformer, overwriting inital coordinates
call('obabel -imol %s -omol -O %s --conformer --ff MMFF94 --nconf 1000 --weighted --log' % (file, file), shell = True)
energy = !obenergy {file}
print(energy[-1])
print('Energy minimization with Steepest descent...')
#First minimization, steepest descent, n steps, writing to new _min.mol file
call('obminimize -o mol -sd -newton -n 30000 %s > %s_min.mol'% (file, file.strip('.mol')), shell = True)
arg = file.strip('.mol') + '_min.mol'
energy = !obenergy {arg}
print(energy[-1])
#overwriting coordinates from _min.mol file to original file
call('obabel -imol %s_min.mol -omol -O %s' % (file.strip('.mol'),file), shell = True)
print('Energy minimization with Conjugate gradient...')
#take new coordinates and perform 2500 steps of conjugate gradient optimization, write to _min.mol-file
call('obminimize -o mol -newton %s > %s_min.mol'% (file, file.strip('.mol')), shell = True)
energy = !obenergy {arg}
print(energy[-1])
print('Completed\n')
print(file)
print('Generating initial geometry...')
#guessing initial geometry, preliminary optimization and writing to mol_file
call('obabel -imol %s -omol -O %s --gen3d' % (file, file), shell = True)
energy = !obenergy {file}
print(energy[-1])
print('Conformer generation...')
#weighted rotor search to find a low-energy conformer, overwriting inital coordinates
call('obabel -imol %s -omol -O %s --conformer --ff MMFF94 --nconf 1000 --weighted --log' % (file, file), shell = True)
energy = !obenergy {file}
print(energy[-1])
print('Energy minimization with Steepest descent...')
#First minimization, steepest descent, n steps, writing to new _min.mol file
call('obminimize -o mol -sd -newton -n 30000 %s > %s_min.mol'% (file, file.strip('.mol')), shell = True)
arg = file.strip('.mol') + '_min.mol'
energy = !obenergy {arg}
print(energy[-1])
#overwriting coordinates from _min.mol file to original file
call('obabel -imol %s_min.mol -omol -O %s' % (file.strip('.mol'),file), shell = True)
print('Energy minimization with Conjugate gradient...')
#take new coordinates and perform 2500 steps of conjugate gradient optimization, write to _min.mol-file
call('obminimize -o mol -newton %s > %s_min.mol'% (file, file.strip('.mol')), shell = True)
energy = !obenergy {arg}
print(energy[-1])
print('Completed\n')
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss