xiaoruiDong / RDMC

Reaction Data and Molecular Conformers (RDMC) is a package dealing with reactions, molecules, conformers, majorly in 3D.
https://xiaoruidong.github.io/RDMC/
MIT License
22 stars 1 forks source link

Use n_pruned_confs instead of repetitive calculation #29

Closed hwpang closed 2 years ago

hwpang commented 2 years ago

@kspieks and I ran into a case where sum(opt_ts_mol.KeepIDs.values()) - len(unique_ids) gives a negative number, because sum(opt_ts_mol.KeepIDs.values()) gives 0 for the 0 index case. This value should be calculated as len(opt_ts_mol.KeepIDs.values()) - len(unique_ids). This number was also already calculated within the pruner and stored in the attribute n_pruned_confs, so I made the one line change.