Use list<Molecule> instead of vector<Molecule>