replace getformula() with SMILEwriter using openbabel for nitrogen