Sets the orbital enenergies for on the reference of the free case.
          By setting the desired local populations on every orbital.
          Then generate the necesary operators to respect such configuraion
19857
def set_filling(self, populations):
        """"""
        populations = np.asarray(populations)
#
#        self.param['orbital_e'] -= bethe_findfill_zeroT( \
#                                        self.param['avg_particles'],
#                                        self.param['orbital_e'],
#                                        self.param['hopping'])
        efermi = - bethe_find_crystalfield(
                            populations, self.param['hopping'])
        self.param['populations'] = populations
#        fermion_avg(efermi, self.param['hopping'], 'ocupation')
        self.param['ekin'] = fermion_avg(efermi, self.param['hopping'], 'ekin')

        spin_gen_op(self.oper, estimate_gauge(populations))
683874
@Override
    protected void configure() {

        install(new com.englishtown.promises.hk2.WhenBinder());

        bind(VertxExecutor.class).to(Executor.class).in(Singleton.class).ranked(10);

        bind(DefaultWhenVertx.class).to(WhenVertx.class).in(Singleton.class);
        bind(DefaultWhenEventBus.class).to(WhenEventBus.class).in(Singleton.class);
        bind(DefaultWhenHttpClient.class).to(WhenHttpClient.class).in(Singleton.class);
        bind(DefaultWhenFileSystem.class).to(WhenFileSystem.class).in(Singleton.class);
        bind(DefaultPromiseAdapter.class).to(PromiseAdapter.class).in(Singleton.class);

    }
748923
private static void addTetrahedralConfiguration(ITetrahedralChirality tc, GraphBuilder gb, Map<IAtom, Integer> indices) {

        IAtom[] ligands = tc.getLigands();

        int u = indices.get(tc.getChiralAtom());
        int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(ligands[2]),
                indices.get(ligands[3])};

        gb.tetrahedral(u).lookingFrom(vs[0]).neighbors(vs[1], vs[2], vs[3])
                .winding(tc.getStereo() == CLOCKWISE ? Configuration.CLOCKWISE : Configuration.ANTI_CLOCKWISE).build();
    }
151492
function setEngine(theEngine) {
	engine = theEngine
	store = engine.getStore()
	pubsub = engine.getPubSub()
}
586632
public void buildNewReferenceSet2() {
    for (int i = 0; i < getPopulation().size(); i++) {
      DoubleSolution individual = getPopulation().get(i);
      double distanceAux = SolutionUtils
          .distanceToSolutionListInSolutionSpace(individual, referenceSet1);
      distanceToSolutionListAttribute.setAttribute(individual, distanceAux);
    }

    int size = referenceSet2Size;
    if (getPopulation().size() < referenceSet2Size) {
      size = getPopulation().size();
    }

    for (int i = 0; i < size; i++) {
      // Find the maximumMinimumDistanceToPopulation
      double maxMinimum = 0.0;
      int index = 0;
      for (int j = 0; j < getPopulation().size(); j++) {

        DoubleSolution auxSolution = getPopulation().get(j);
        if (distanceToSolutionListAttribute.getAttribute(auxSolution) > maxMinimum) {
          maxMinimum = distanceToSolutionListAttribute.getAttribute(auxSolution);
          index = j;
        }
      }
      DoubleSolution individual = getPopulation().get(index);
      getPopulation().remove(index);

      // Update distances to REFSET in population
      for (int j = 0; j < getPopulation().size(); j++) {
        double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(getPopulation().get(j), individual);

        if (aux < distanceToSolutionListAttribute.getAttribute(individual)) {
          DoubleSolution auxSolution = getPopulation().get(j);
          distanceToSolutionListAttribute.setAttribute(auxSolution, aux);
        }
      }

      // Insert the individual into REFSET2
      marked.setAttribute(individual, false);
      referenceSet2.add(individual);

      // Update distances in REFSET2
      for (int j = 0; j < referenceSet2.size(); j++) {
        for (int k = 0; k < referenceSet2.size(); k++) {
          if (i != j) {
            double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(referenceSet2.get(j), referenceSet2.get(k));
            DoubleSolution auxSolution = referenceSet2.get(j);
            if (aux < distanceToSolutionListAttribute.getAttribute(auxSolution)) {
              distanceToSolutionListAttribute.setAttribute(auxSolution, aux);
            }
          }
        }
      }
    }
  }
698953
public void setEmissive(float emissive[]){
        for(int i = 0; i<emissive.length;i++)
            this.emissive[i]=emissive[i];
        Em = true;
    }
974290
def _setup(self):
        

        cls = self.__class__
        cls._id_map = {}
        cls._name_map = {}
        for index, info in enumerate(cls._alternatives):
            if len(info) < 3:
                info = info + ({},)
                cls._alternatives[index] = info
            id_ = _build_id_tuple(info[2], info[1])
            cls._id_map[id_] = index
            cls._name_map[info[0]] = index
973910
def make_force_ES(q_vars, mass):
    """"""
    # Build the potential energy fluxion; just one pair of bodies
    U =  U_ij(q_vars, mass, 0, 1)
    # Varname arrays for both the coordinate system and U
    vn_q = np.array([q.var_name for q in q_vars])
    vn_fl = np.array(sorted(U.var_names))
    # Permutation array for putting variables in q in the order expected by U (alphabetical)
    q2fl = np.array([np.argmax((vn_q == v)) for v in vn_fl])
    # Permutation array for putting results of U.diff() in order of q_vars
    fl2q = np.array([np.argmax((vn_fl == v)) for v in vn_q])
    # Return a force function from this potential
    force_func = lambda q: -U.diff(q[q2fl]).squeeze()[fl2q]
    return force_func
1257647
def set_phases(self, literals=[]):
        

        if self.maplesat:
            pysolvers.maplesat_setphases(self.maplesat, literals)
1140575
def set_phases(self, literals=[]):
        

        if self.minicard:
            pysolvers.minicard_setphases(self.minicard, literals)
1274325
def minimize(self, tolerance=None, max_iterations=None):
        
        if tolerance is None:
            tolerance = self.minimization_tolerance
        if max_iterations is None:
            max_iterations = self.minimization_max_iterations
        self.simulation.minimizeEnergy(tolerance * u.kilojoules_per_mole, max_iterations)
1056858
void setNewNodes() {

        int indexcount = tTable.getIndexCount();

        nPrimaryNode = new NodeAVLDisk(this, 0);

        NodeAVL n = nPrimaryNode;

        for (int i = 1; i < indexcount; i++) {
            n.nNext = new NodeAVLDisk(this, i);
            n       = n.nNext;
        }
    }
578697
public void setAtoms(Atom[] atoms){
		Structure s = new StructureImpl();
		Chain c = new ChainImpl();
		c.setId("A");
		for (Atom a: atoms){
			c.addGroup(a.getGroup());
		}
		s.addChain(c);
		setStructure(s);
	}
338658
def setup(delta_x, delta_y, delta_z, pos)
      # Set up the provided parameters:
      @delta_x = delta_x
      @delta_y = delta_y
      @delta_z = delta_z
      self.pos = pos
      # Set up the dimensional parameters:
      @nx, @ny, @nz = self.shape
    end
1062614
protected void setTessVariables() {
        Enumeration<?> em = prop.propertyNames();
        while (em.hasMoreElements()) {
            String key = (String) em.nextElement();
            TessBaseAPISetVariable(handle, key, prop.getProperty(key));
        }
    }
1236205
function _setEngine()
    {
        $this->engine = null;

        $candidateEngines = array(
            $this->preferredEngine,
            self::ENGINE_OPENSSL,
            self::ENGINE_MCRYPT
        );
        foreach ($candidateEngines as $engine) {
            if ($this->isValidEngine($engine)) {
                $this->engine = $engine;
                break;
            }
        }
        if (!$this->engine) {
            $this->engine = self::ENGINE_INTERNAL;
        }

        if ($this->engine != self::ENGINE_MCRYPT && $this->enmcrypt) {
            // Closing the current mcrypt resource(s). _mcryptSetup() will, if needed,
            // (re)open them with the module named in $this->cipher_name_mcrypt
            @mcrypt_module_close($this->enmcrypt);
            @mcrypt_module_close($this->demcrypt);
            $this->enmcrypt = null;
            $this->demcrypt = null;

            if ($this->ecb) {
                @mcrypt_module_close($this->ecb);
                $this->ecb = null;
            }
        }

        $this->changed = true;
    }
730814
def set_phases(self, literals=[]):
        

        if self.maplesat:
            pysolvers.maplecm_setphases(self.maplesat, literals)