|
From: Geoffrey H. <ge...@ge...> - 2007-03-30 19:55:44
|
On Mar 30, 2007, at 2:46 PM, richard apodaca wrote:
> It looks like ruby open babel still works, but this is
> an eyesore. Any ideas on how to clear it up?
Sure. These are residue IDs defined in an enum in residue.h. I'll
make sure to remove them for SWIG wrappers now.
Otherwise, I noticed that in Ruby, SWIG now uses the same types of
CamelCase as the original C++. While it's not perhaps not preferred
Ruby syntax, it does match the API docs.
e.g.
require 'openbabel'
include Openbabel
smi2mol = OBConversion.new
smi2mol.SetInFormat("smi")
mol = OBMol.new
smi2mol.ReadString(mol, 'c1ccccc1')
mol.AddHydrogens
puts mol.NumAtoms
puts mol.GetFormula
Cheers,
-Geoff
|