From 40527220b89df5e9697964a46c0dcb5a28620df7 Mon Sep 17 00:00:00 2001 From: Vaishnavi Bhandari Date: Sun, 26 Jan 2025 18:04:14 +0000 Subject: [PATCH] Functionality for setting size of ghost atom Signed-off-by: Vaishnavi Bhandari --- avogadro/core/elements.cpp | 7 ++++--- avogadro/core/elements.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/avogadro/core/elements.cpp b/avogadro/core/elements.cpp index cb22229c15..f8256972b7 100644 --- a/avogadro/core/elements.cpp +++ b/avogadro/core/elements.cpp @@ -26,7 +26,8 @@ static std::vector CustomElementSymbols; static std::vector CustomElementNames; // Match carbon's radii - +static std::vector CustomElementCovalentRadii; +static std::vector CustomElementVDWRadii; inline std::string encodeCustomElement(unsigned char atomicNumber) { @@ -126,14 +127,14 @@ void setCustomElementVDWRadius(unsigned char atomicNumber, double radius) } } } // end anon namespace -void Elements::setCustomElementCovalentRadius(unsigned char atomicNumber, double radius) +void setCustomElementCovalentRadius(unsigned char atomicNumber, double radius) { if (isCustomElement(atomicNumber)) { CustomElementCovalentRadii[atomicNumber - CustomElementMin] = radius; } } -void Elements::setCustomElementVDWRadius(unsigned char atomicNumber, double radius) +void setCustomElementVDWRadius(unsigned char atomicNumber, double radius) { if (isCustomElement(atomicNumber)) { CustomElementVDWRadii[atomicNumber - CustomElementMin] = radius; diff --git a/avogadro/core/elements.h b/avogadro/core/elements.h index 4c76c02022..5ba1b0d5d4 100644 --- a/avogadro/core/elements.h +++ b/avogadro/core/elements.h @@ -76,8 +76,8 @@ class AVOGADROCORE_EXPORT Elements /** @return the mass of the element with the supplied @p atomicNumber. */ static double mass(unsigned char atomicNumber); - static void setCustomElementVDWRadius(unsigned char atomicNumber, double radius); - static void setCustomElementCovalentRadius(unsigned char atomicNumber, double radius); + static void setCustomElementVDWRadii(unsigned char atomicNumber, double radius); + static void setCustomElementCovalentRadii(unsigned char atomicNumber, double radius); /** * @return the Van der Waals radius of the element with the supplied * @p atomicNumber.