On May 7, 2010, at 12:32 AM, Egon Willighagen wrote: > moving to: cdk-user > > Hi Rajarshi, > > On Fri, May 7, 2010 at 4:07 AM, Rajarshi Guha > <rajarshi.g...@gmail.com> wrote: >> Take an SDF file with no H's and then call >> AtomContainerManipulator.convertImplicitToExplicitHydrogens and no >> H's >> are added. > > SD files do not have info on the number of implicit hydrogens, making > the field set to UNKNOWN (null). The > convertImplicitToExplicitHydrogens has nothing to convert yet;
Indeed, this is what I concluded last night > I'd > guess you simply have to calculate the number of implicit hydrogens > first? How would I do that? > >> But if the corresponding SMILES form is read in, and implcit H's are >> converted to explicit, H's are added. > > SMILES on the other hand *does* specify the number of implicit > hydrogens (implicitly, of course), but it's part of the standard... so > the SmilesParser does atom type detection, calculate number of > implicit hydrogens, and actually aromaticity detection too... No, the parser doesn't do aromaticity detection or atom typing. That has to be done separately > The > values now being set, the convert() method has something to convert... Yes, from SMILES, the hcount variable is non-null and therefore H's get added ---------------------------------------------------- Rajarshi Guha | NIH Chemical Genomics Center http://www.rguha.net | http://ncgc.nih.gov ---------------------------------------------------- Build a system that even a fool can use and only a fool will want to use it. ------------------------------------------------------------------------------ _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user