#ifndef _CHAIN_H_
#define _CHAIN_H_

#include <vector>
#include <unordered_map>
#include <boost/optional.hpp>

#include "Atom.hpp"
#include "Residue.hpp"
// std::string in case we want to have a mmcif parser too
struct Atom;

struct Chain
{
private:
	std::unordered_map<int, int> serialToResidueInVectorMap;
public:
	short serial;
	std::string chainID;
	std::string iCode;
	std::vector<Residue> residues;

	boost::optional<Atom &> findAtom(int atomID);
	boost::optional<const Atom &> findAtom(int atomID) const;
	void fillMap();
};
#endif
