From 44ed921f9e48de5bab446eb9ac916cb30d5ed9f5 Mon Sep 17 00:00:00 2001 From: bpuchala Date: Fri, 29 Sep 2023 14:26:24 -0400 Subject: [PATCH] fix has_dof check --- src/casm/crystallography/Site.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/casm/crystallography/Site.cc b/src/casm/crystallography/Site.cc index 02ac797..790e36f 100644 --- a/src/casm/crystallography/Site.cc +++ b/src/casm/crystallography/Site.cc @@ -88,8 +88,11 @@ SiteDoFSet const &Site::dof(std::string const &_dof_type) const { //**************************************************** bool Site::has_dof(std::string const &_dof_type) const { - return occupant_dof().size() > 1 || - m_dof_map.find(_dof_type) != m_dof_map.end(); + static std::string OCC_DOF = "occ"; + if (_dof_type == OCC_DOF) { + return occupant_dof().size() > 1; + } + return m_dof_map.find(_dof_type) != m_dof_map.end(); } //****************************************************