bonds {ChemmineR} | R Documentation

## Bonds, charges and missing hydrogens

### Description

Returns information about bonds, charges and missing hydrogens in `SDF` and `SDFset` objects.

### Usage

    bonds(x, type = "bonds")

### Arguments

`x` | `SDF` or `SDFset` containers
`type` | If `type="bonds"` (default), a `data.frame` is returned with columns: `atom` (atom labels), `Nbondcount` (observed bond count), `Nbondrule` (bond count according to position in periodic table) and `charge` (charge of each atom). If `type="charge"`, all charged atoms are returned and if `type="addNH"`, the number of missing hydrogens are returned for each molecule.

### Details

It is used by many other functions (e.g. `MW`, `MF`, `atomcount`, `atomcuntMA` and `plot`) to correct for missing hydrogens that are often not specified in SD files.

### Value

If `x` is of class `SDF`, then a single `data.frame` or `vector` is returned. If `x` is of class `SDFset`, then a `list` of `data.frames` or `vecotors` is returned that has the same length and order as `x`.

### Author(s)

Thomas Girke

### References

...

### See Also

Functions: `conMA`

Class: `SDF` and `SDFset`

### Examples

    ## Instances of SDFset class
    data(sdfsample)
    sdfset <- sdfsample

    ## Returns data frames with bonds and charges
    bonds(sdfset[1:2], type="bonds")

    ## Returns charged atoms in each molecule
    bonds(sdfset[1:2], type="charge")

    ## Returns the number of missing hydrogens in each molecule
    bonds(sdfset[1:2], type="addNH")

[Package ChemmineR version 3.36.0 Index]