Consider the following Python code, which is meant to count the number of molecules in molecules.sdf that pass Lipinski's rule of fives: from rdkit import Chem from rdkit.Chem import AllChem, Crippen, Lipinski mols = [mol for mol in Chem.SDMolSupplier("molecules.sdf") if mol is not None] cnt = 0 for m in mols: mw = 1 if AllChem.CalcExactMolWt(m) <= 500 else 0 logp = 1 if Crippen.MolLogP(m) <= 5 else 0 hd = 1 if Lipinski.NumHDonors(m) <= 5 else 0 ha = 1 if Lipinski.NumHAcceptors(m) <= 10 else 0 num_pass = mw + logp + hd + ha # Modified rule: incorrectly rejects molecules with even one violation if num_pass == 4: cnt += 1 print(cnt) What is wrong with this code?单项选择题
A
The script incorrectly loads molecules because Chem.SDMolSupplier("molecules.sdf") does not return a list.
B
It incorrectly calculates molecular weight using AllChem.CalcExactMolWt(m), which is not an RDKit function.
C
It does not allow for one violation of the four criteria, which contradicts the rule’s original intent.
D
The code should be using >= instead of <= in the threshold conditions.
E
The code should count the number of violations instead of the number of passing criteria.
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!