Closed Aariq closed 4 months ago
Unfortunately, validSDF()
does not check very many things and will let a lot through that still generate warnings or errors from, e.g., propOB()
. #56 might be a better thing to pursue
The callr
approach implemented with safe_propOB()
in #96 is working, but has some major downsides.
propOB()
just return zeroes when passed to ChemmineR::groups()
.propOB()
takes 0.7 seconds and safe_propOB()
takes about 4 minutes. I don't think there is any chance of speeding this up.Alternatives
Allow users to choose between regular propOB()
and safe_propOB()
with an argument to calc_vol()
like catch_OB_err = TRUE
or something.
Validate the output of propOB()
(and possibly other functions) "manually" by looking for known issues and replacing all values with NA
if they are found.
*
character.NA
or ""
) for SMILES, InChI, or formula, indicating there were problems generating thoseMight be worthwhile to spend some time purposefully trying to break .mol files or SMILES to get a better test set
Decided to introduce a validate
argument to calc_vol()
(that is passed to get_fx_groups()
) that checks for the symptoms of an OpenBabel error such as empty strings for InChI. If those symptoms are found, all values are replaced with NA and a warning is printed, possibly add a logical column valid
as well.
In
calc_vol()
after mol files or SMILES are converted to SDF, check if any were invalid usingChemmineR::validSDF()
, then warn the user and return NA for those inputs.