Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

trim.mol2

Trim a MOL2 Object To A Subset of Atoms.


Description

Produce a new smaller MOL2 object, containing a subset of atoms, from a given larger MOL2 object.

Usage

## S3 method for class 'mol2'
trim(mol, ..., inds = NULL)

Arguments

mol

a MOL2 structure object obtained from read.mol2.

...

additional arguments passed to atom.select. If inds is also provided, these arguments will be ignored.

inds

a list object of ATOM and XYZ indices as obtained from atom.select. If NULL, atom selection will be obtained from calling atom.select(mol, ...).

Details

This is a basic utility function for creating a new MOL2 object based on a selection of atoms.

Value

Returns a list of class "mol2".

Author(s)

Lars Skjaerven

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

See Also

Examples

## Not run: 
## Read a MOL2 file from those included with the package
mol <- read.mol2( system.file("examples/aspirin.mol2", package="bio3d"))

## Trim away H-atoms
mol <- trim(mol, "noh")


## End(Not run)

bio3d

Biological Structure Analysis

v2.4-2
GPL (>= 2)
Authors
Barry Grant [aut, cre], Xin-Qiu Yao [aut], Lars Skjaerven [aut], Julien Ide [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.