Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ghost_atom' into ghost_atom
Browse files Browse the repository at this point in the history
  • Loading branch information
peach280 committed Jan 26, 2025
2 parents e22ba14 + 7934ce8 commit 7721859
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions avogadro/core/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +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)
{
std::string result;
Expand Down Expand Up @@ -126,7 +126,19 @@ void setCustomElementVDWRadius(unsigned char atomicNumber, double radius)
}
}
} // end anon namespace
void Elements::setCustomElementCovalentRadius(unsigned char atomicNumber, double radius)
{
if (isCustomElement(atomicNumber)) {
CustomElementCovalentRadii[atomicNumber - CustomElementMin] = radius;
}
}

void Elements::setCustomElementVDWRadius(unsigned char atomicNumber, double radius)
{
if (isCustomElement(atomicNumber)) {
CustomElementVDWRadii[atomicNumber - CustomElementMin] = radius;
}
}
unsigned char Elements::elementCount()
{
return element_count;
Expand Down

0 comments on commit 7721859

Please sign in to comment.