MobleyLab / FreeSolv

Experimental and calculated small molecule hydration free energies
http://www.escholarship.org/uc/item/6sd403pz
101 stars 53 forks source link

rebuild_freesolv.py script #46

Closed kadiliissaar closed 4 years ago

kadiliissaar commented 4 years ago

Hello!

I have been trying to run the rebuild_freesolv.py script but it seems the molecules do not get correct coordinates, in fact they get generated with the coordinates of all atoms as zeros (as opposed to the files that are already available in the mol2files_sybyl folder). Do you know what the reason for this may be?

Best wishes, Kadi

jchodera commented 4 years ago

It looks like the scripts/rebuild_freesolv.py script relies on openmoltools, which is pretty fragile and hasn't always remained backwards-compatible: https://github.com/choderalab/openmoltools image We've been hoping to replace all this functionality with more modern tools in the openforcefield toolkit and OpenMM, but haven't yet updated the FreeSolv repo yet.

It looks like the default behavior of get_charges() changed at some point to no longer retain the conformers generated during the charging process.

You should be able to just change this line from

    charged = openmoltools.openeye.get_charges(molecule)

to

    charged = openmoltools.openeye.get_charges(molecule, keep_confs=1)

and you'll have a conformer!

kadiliissaar commented 4 years ago

Yes, this solves the problem - thanks a lot!