Skip to content

Commit

Permalink
Do not compare types, use isinstance()
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi-FanLi authored Dec 14, 2023
1 parent 9076806 commit 37d811b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpti/hti.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 37d811b

Please sign in to comment.