Skip to content

Commit

Permalink
Functionality for setting size of ghost atom
Browse files Browse the repository at this point in the history
Signed-off-by: Vaishnavi Bhandari <vaishnavibhandari.128@gmail.com>
  • Loading branch information
peach280 committed Jan 26, 2025
1 parent 7721859 commit 4052722
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions avogadro/core/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ static std::vector<std::string> CustomElementSymbols;
static std::vector<std::string> CustomElementNames;

// Match carbon's radii

static std::vector<double> CustomElementCovalentRadii;
static std::vector<double> CustomElementVDWRadii;

inline std::string encodeCustomElement(unsigned char atomicNumber)
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions avogadro/core/elements.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4052722

Please sign in to comment.