From 37d811b0ac0b9c3fa469e0948d8f46084309ccd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yifan=20Li=E6=9D=8E=E4=B8=80=E5=B8=86?= Date: Thu, 14 Dec 2023 00:45:37 -0500 Subject: [PATCH] Do not compare types, use `isinstance()` --- dpti/hti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpti/hti.py b/dpti/hti.py index 28b24ad1..b81f5ff1 100755 --- a/dpti/hti.py +++ b/dpti/hti.py @@ -390,7 +390,7 @@ def _gen_lammps_input( ret += "thermo ${THERMO_FREQ}\n" ret += "compute allmsd all msd\n" if 1 - lamb != 0: - if type(m_spring_k) is not list: + if not isinstance(m_spring_k, list): if switch == "three-step": ret += "thermo_style custom step ke pe etotal enthalpy temp press vol f_l_spring c_e_diff[1] c_allmsd[*]\n" else: