On 07/07/2010 19:12, Noel O'Boyle wrote: > On a slightly different note, is it currently possible to provide > modifying options to ops? I keep thinking it would be very useful to > have different qualities of "--gen3D" - is there an existing framework > that could be used to pass options to this?
Yes, but this is one of the reasons for using obabel rather than babel. With obabel in.smi --gen3D noFF -omol the OptionText parameter in gen3D's Do function contains "noFF", which the Do function can interpret. The parameter could be omitted on the command line, or could contain spaces, so that it would look like multiple parameters. With babel, it is necessary to specify how many parameters an option takes (OBConversion::RegisterOptionParam() in the op's constructor), and you usually have to actually provide this number. However you can get away without doing so if it is the last thing on the line, but you will get surprising results when you forget and stick -b or something similar at the end. For the GUI, a parameter that can be omitted should be in square brackets in Description(), see --unique. When coding, you can use pOp->Do(pmol, "noFF"). Chris ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel