CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

test.formula commented out? #85

Closed schymane closed 5 years ago

schymane commented 5 years ago

Is there a reason this is commented out? https://github.com/rajarshi/cdkr/blob/master/rcdk/inst/unitTests/runit.rcdk.R#L38

@sneumann Could be one location to write the get.exact.mass unit test. base code worksforme if I run off parse.smiles but not the ref to the mol file when I run locally (for obvious reasons, I didn't go digging for the file ...).

m <- parse.smiles("C1(C(C(C(C(C1OP(=O)(O)OCC(COC(=O)CCCCCCCNC(=O)CCCCC2SCC3C2NC(=O)N3)OC(=O)CCCCCCC)O)OP(=O)(O)O)OP(=O)(O)O)O)O")[[1]]
do.aromaticity(m)
#note returns FALSE as non-aromatic
do.typing(m)
do.isotopes(m)
convert.implicit.to.explicit(m)
f2 <- get.mol2formula(m)
f2
checkEquals(f2@string, "C35H64N3O21P3S")
#it's easy to add the mass check here then:
checkEquals(get.exact.mass(m),987.2966)
zachcp commented 5 years ago

this should be uncommented. I may have commented it while bug-fixing and forgotten to restore it

On Sat, Nov 10, 2018 at 2:14 AM Emma Schymanski notifications@github.com wrote:

Is there a reason this is commented out?

https://github.com/rajarshi/cdkr/blob/master/rcdk/inst/unitTests/runit.rcdk.R#L38

@sneumann https://github.com/sneumann Could be one location to write the get.exact.mass unit test. base code worksforme if I run off parse.smiles but not the ref to the mol file when I run locally (for obvious reasons, I didn't go digging for the file ...).

m <- parse.smiles("C1(C(C(C(C(C1OP(=O)(O)OCC(COC(=O)CCCCCCCNC(=O)CCCCC2SCC3C2NC(=O)N3)OC(=O)CCCCCCC)O)OP(=O)(O)O)OP(=O)(O)O)O)O")[[1]] do.aromaticity(m)

note returns FALSE as non-aromatic

do.typing(m) do.isotopes(m) convert.implicit.to.explicit(m) f2 <- get.mol2formula(m) f2 checkEquals(f2@string, "C35H64N3O21P3S")

it's easy to add the mass check here then:

checkEquals(get.exact.mass(m),987.2966)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rajarshi/cdkr/issues/85, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM8ex9_buHAKAVL-nggJoM-Czfthu6Gks5utnzjgaJpZM4YX3hb .