.
$ npm i openchemlib-utils
import OCL from 'openchemlib';
import { Path, initOCL } from 'openchemlib-utils';
initOCL(OCL);
const molecule = OCL.Molecule.fromSmiles('CCCCC');
const paths = Path.getPathsInfo(molecule, {
fromLabel: 'H',
toLabel: 'H',
minLength: 1,
maxLength: 4,
});
console.log(paths);
We will add more examples in /examples
.