#include "PDB_viewer.h"
#include "CPKColorScheme.h"
#include <map>

static const std::map<std::string, FVector> CPKColorMap =
{
	{"H", hexColorToVector(0xFFFFFF)},
	{"C", hexColorToVector(0x202020)},
	{"N", hexColorToVector(0x3050F8)},
	{"O", hexColorToVector(0xFF0D0D)},
	{"F", hexColorToVector(0x90E050)},
	{"P", hexColorToVector(0xFF8000)},
	{"S", hexColorToVector(0xFFFF30)},
	{"CL", hexColorToVector(0x1FF01F)},
	{"FE", hexColorToVector(0xE06633)},
	{"CO", hexColorToVector(0xF090A0)},
	{"NI", hexColorToVector(0x50D050)},
	{"CU", hexColorToVector(0xC88033)},
	{"BR", hexColorToVector(0xA62929)},
	{"I", hexColorToVector(0x940094)},
};

FVector CPKColorScheme::getColorForElement(std::string elementName)
{
	if (CPKColorMap.find(elementName) != CPKColorMap.end())
		return CPKColorMap.at(elementName);
	return INVALID_COLOR;
}
