Specifying max number of structures

Good afternoon:

It would be a nice feature of maps that you can say:
Do the structure generation as usual, but limit the search to "N_max" structures in total. That is, maps runs in its usual way, but you, in a sense, limit the total set of all possible structure to the size "N_max".

Or maybe better, not N_max being the total count of structures but rather the "volume index" of the structures (so when it is 12 we include all structures with unit cells up to 12 atoms/cell).

Thank you

Quick (and admittedly ugly) fix: in refine.c++, look for

Real calc_structure_cost(const Structure &str, const rMatrix3d &cell, const Array<rMatrix3d> &point_op, const Array<rVector3d> &trans, Real complexity_exp) {
  return pow((Real)(str.atom_pos.get_size()),complexity_exp);
}

and replace by

Real calc_structure_cost(const Structure &str, const rMatrix3d &cell, const Array<rMatrix3d> &point_op, const Array<rVector3d> &trans, Real complexity_exp) {
  if (complexity_exp<0) {
    return ((Real)(str.atom_pos.get_size())>-complexity_exp ? MAXFLOAT : 1. );
  }
  else {
    return pow((Real)(str.atom_pos.get_size()),complexity_exp);
  }
}

and you activate it with -c=-[number of atoms]
(don’t forget the minus).

As of version 3.15, there is a better solution: use the -mv option of maps or mmaps to specify a maximum number of atom per cell.