Welcome to sampler flask!

Run sampler interactively

API endpoint

Sampler flask lets you use a web interface, either interactive or via an API, to find a given number (n_results) of points (vectors) which satisfy constraints given in an input_file for an n-dimensional space defined on the unit hypercube, then write them to an output file (output_file), which you can download.

New for February 2022: You can now identify the components (dimensions) in your input (constraints) file using chemical formulas. Sampler will use ChemPy to calculate their molar masses, then output the component weight fraction if requested. You can still also output the component fractions.

Example constraints file, available as gold18k_formulas.txt on the run page:

      Label                File contents
      -----------------    ----------------------------
      n dimensions         2
      Sample point         0.10 0.10
      Chemical formulas    #% Cu Ni Au
      Comment              # 18k gold: ~75% gold,
      Comment              # remainder copper or nickel
      Comment              # Cu can be 10-25%
      Constraint 1         x[0] - 0.10 >= 0.0   
      Constraint 2         0.25 - x[0] >= 0.0  
      Comment              # Ni can be 1-25%
      Constraint 3         x[1] - 0.01 >= 0.0
      Constraint 4         0.25 - x[1] >= 0.0
      Comment              # Copper + nickel 20-30%
      Constraint 5         x[0] + x[1] - 0.20 >= 0
      Constraint 6         0.30 - x[0] - x[1] >= 0