[ghemical-devel] Molecule Comparison
Geoffrey Hutchison
geoff at geoffhutchison.net
Tue Apr 11 17:25:04 EDT 2006
On Apr 11, 2006, at 5:07 PM, Donald Ephraim Curtis wrote:
> information, along with requiring the code to find molecules that
> are the same. For example, selecting one molecule and finding all
> similar molecules (finding all water molecules). I was just
> wondering what facilities are already included in the ghemical code
> that would help do this, or any algorithms that would help. One
> idea was to convert the molecules using openbabel to the SMILE
> format and then doing a string comparison. Any suggestions would
> be helpful.
You don't need to even do that. Besides, it's generally a bad idea to
do straight string comparisons with SMILES. There's no guarantee that
equivalent molecules necessarily have equivalent SMILES strings.
* Inside Open Babel, you can easily do SMARTS matching (e.g., if this
set of atoms matches SMARTS of [OD2]).
* There isn't support for "equivalence" (e.g. mol1 == mol2) but
that's certainly a reasonable feature request.
* Open Babel 2 also supports similarity searching using molecular
fingerprints.
So to answer your question, using code like project::HtoMethyl() you
can sync to an OBMol and write code to search for water molecules.
Cheers,
-Geoff
More information about the ghemical-devel
mailing list