conMA {ChemmineR} | R Documentation

## Bond Matrices

### Description

Creates a bond matrix from `SDF` and `SDFset` objects. The matrix contains the atom labels in the row and column titles and the bond types are given in the data part as follows: 0 is no connection, 1 is a single bond, 2 is a double bond and 3 is a triple bond.

### Usage

    conMA(x, exclude = "none")

### Arguments

`x` | `SDF` or `SDFset` containers
`exclude` | if `exclude="none"`, then all atoms will be considered in the resulting connection table; if `exclude=c("H")`, then the H atoms will be excluded. Any number of atom labels to be excluded can be passed on to this argument in form of a `character` vector.

### Details

...

### Value

If `x` is of class `SDF`, then a single bond `matrix` is returned. If `x` is of class `SDFset`, then a `list` of matrices is returned that has the same length as `x`.

### Author(s)

Thomas Girke

### References

...

### See Also

Functions: `bonds`

Class: `SDF` and `SDFset`

### Examples

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

    ## Create bond matrix for first two molecules in sdfset
    conMA(sdfset[1:2], exclude=c("H"))

    ## Return bond matrix for first molecule and plot its structure with atom numbering
    conMA(sdfset[[1]], exclude=c("H"))
    plot(sdfset[1], atomnum = TRUE, noHbonds=FALSE , no_print_atoms = "", atomcex=0.8)

    ## Return number of non-H bonds for each atom
    rowSums(conMA(sdfset[[1]], exclude=c("H")))

[Package ChemmineR version 3.40.0 Index]