Just for the completeness, this solution works pretty well:
initialize13C <- function( a12C13C14C = c( 0.1, 0.9, 0 ) ) {
require("Rdisop")
elements <- initializePSE()
elements <- lapply( elements, function(x){
if(x$name == "C" ){
x$isotope$abundance <- a12C13C14C
}
return( x )
})
return(elements)
}
H1 <- 1.007825032
C12 <– 12
C13 <- 13.00335484
O16 <- 15.99491462
all.equal(
sapply( 0:6, FUN=function(x) { x * C13 + (6-x) * C12 + 12 * H1 + 6 * O16 } ),
getIsotope( getMolecule( "C6H12O6", elements=initialize13C() ) )[ 1,1:7 ]
)
[1] TRUE
Thanks again for pointing me to the right direction. I simply missed the "elements" parameter in getMolecule().
Isam