Argon A-to-Z

This tutorial aims to take the user from no familiarity with MDMC to enough competence that they can create a simple simulation and run a refinement, by walking through a simulation and refinement for the liquid argon data from van Well et al. (1985). For more details on specific parts of this, please see the how-to guides!

If you’d like to learn more about a specific object, use the Python help() command - for example help(Atom) provides information on the MDMC Atom.

We first import all of the objects we require, and set some environmental variables.

[1]:
import os
import copy

import numpy as np

from MDMC.control import Control
from MDMC.MD import Atom, NonBonded, Simulation, Universe
from MDMC.MD.interactions import NonBondedForce
from MDMC.readers.observables.xml_SQw import XML_SQw
from MDMC.refinement.FoM.FoM_abs import ObservablePair
from MDMC.trajectory_analysis.observables.mdanse_observable import MDANSEObservable, get_default_mdanse_settings

Setting up a configuration and simulation

We now build our Universe. For this tutorial we’re creating a cube of argon-36 atoms; our side length is 23.0668Å (angstrom), and the atoms fill it with a density of 0.0176 atoms per cubic angstrom. This simulation matches the experimental data that we’d like to refine against - you will see more about this below.

Atoms are created using MDMC Atom objects, and then the universe is filled with them via the universe.fill method.

[2]:
universe = Universe(dimensions=23.0668)

Ar = Atom('Ar[36]', charge=0.)
universe.fill(Ar, num_density=0.0176)
Universe created with:
Dimensions [23.07 23.07 23.07]

Note that at this point, there are no interaction forces between the argon atoms! The simulation doesn’t know how these atoms should interact with each other. In the cell below an appropriate (for argon) force-field interaction potential is defined; we use a dispersive interaction with potential energy calculated by the Lennard-Jones potential. This interaction has two parameters, epsilon and sigma, which determine the strength of the potential energy between atoms.

[3]:
NonBondedForce(
        universe,
        Ar.atom_type,
        cutoff=10.0,
        ewald=1e-6,
        function=NonBonded(charge=0.0, epsilon=1.0, sigma=3.0)
    )
[3]:
<NonBondedForce
 {function: <NonBonded
 {parameters: {'charge (#1)': <Parameter
 {ID: 1,
  type: 'charge',
  value: 0.0 e,
  unit: 'e',
  fixed: False,
  constraints: None,
  interactions_name: None,
  functions_name: None,
  tied: False}>, 'epsilon (#2)': <Parameter
 {ID: 2,
  type: 'epsilon',
  value: 1.0 kJ / mol,
  unit: 'kJ / mol',
  fixed: False,
  constraints: None,
  interactions_name: None,
  functions_name: None,
  tied: False}>, 'sigma (#3)': <Parameter
 {ID: 3,
  type: 'sigma',
  value: 3.0 Ang,
  unit: 'Ang',
  fixed: False,
  constraints: None,
  interactions_name: None,
  functions_name: None,
  tied: False}>}}>,
  atom_types: (1,),
  cutoff: 10.0 Ang}>

A cutoff distance, past which atoms do not interact, is chosen arbitrarily (see help(Dispersion) for more info). A rule of thumb for Lennard-Jones is to pick cutoff=2.5*sigma. The value for argon is recommended to be between 8 and 12 ang. Ideally, and for any system you want to pick at value of the cutoff which is small while not compromising accuracy. For this system, picking a value between 8 and 12 ang is found to give near identical results to the experimental data.

Refining our data

Our simulation is now fully set up. Now we need some data to which we fit our simulation; here we use an experimental dynamic structure factor \(S(Q, \omega)\) for liquid argon. We call these dynamical properties an ‘observable’.

[4]:
# exp_datasets is a list of dictionaries with one dictionary per experimental
# dataset
# Dataset from: van Well et al. (1985). Physical Review A, 31(5), 3391-3414
# resolution is None as the original author already accounted for instrument resolution
exp_datasets = [{'file_name':'data/Well_s_q_omega_Ar_data.xml',
                 'type':'SQw',
                 'reader':'xml_SQw',
                 'weight':1.,
                 'auto_scale':True,
                 'resolution':800}]

start_params = get_default_mdanse_settings("SQw")

data_parser = XML_SQw('data/Well_s_q_omega_Ar_data.xml')

exp_observable = MDANSEObservable(mdanse_job_type="SQw")
exp_observable.read_from_file(data_parser)
md_observable = MDANSEObservable(mdanse_job_type="SQw")
md_observable.origin = 'MD'
md_observable.independent_variables = copy.deepcopy(
    exp_observable.independent_variables)

observable_pair = ObservablePair(exp_obs=exp_observable,
                                 MD_obs=md_observable,
                                 weight=1.0,
                                 rescale_factor=1.0,
                                 auto_scale=True)

At this stage we check and adjust the analysis parameters.

[5]:
job_settings = md_observable.initial_parameters()
print("Original parameters:")
for name, value in job_settings.items():
    print(f"{name}: {value}")

new_settings = {
    "running_mode": ("multicore", -8)
}
md_observable.set_parameters(new_settings)
Original parameters:
trajectory: INPUT_FILENAME.mdt
frames: all
instrument_resolution: ('gaussian', {'mu': 0.0, 'sigma': 10.0})
q_vectors: ('SphericalLatticeQVectors', {'shells': (0.0, 5.0, 1.0), 'width': 1.0, 'n_samples': 100000, 'n_vectors': 1000, 'seed': 0, 'force_equal_weights': False})
projection: None
grouping_level: atom
atom_selection: {
        "0": {"function_name": "select_all", "operation_type": "union"},
        "1": {"function_name": "select_dummy", "operation_type": "difference"}
    }
atom_transmutation: {}
weights: b_coherent
output_files: ('OUTPUT_FILENAME', ['MDAFormat', 'TextFormat', 'FileInMemory'], 'no logs')
running_mode: ('single-core', 1)

We can use the observables to check if the current parameters of the simulation and the observable calculation produce a result that covers the range of the experimental data.

[6]:
for name, axis in exp_observable.independent_variables.items():
    print(f"{name}: {axis}")

TIME_STEP_FS = 5.0
FRAME_STEP = 15
CORR_FRAMES = 200
TOTAL_FRAMES = 10000

for output_axis in md_observable.predict_output(time_step = TIME_STEP_FS,
                                                frame_step = FRAME_STEP,
                                                total_frames= TOTAL_FRAMES,
                                                correlation_frames = CORR_FRAMES,
                                                universe=universe):
    print(f"{output_axis[0]}: {output_axis[1]} {output_axis[2]}")
Q: [0.42 0.84 1.26 1.62 1.92 2.22 2.58 3.   3.42 3.9 ] 1 / Ang
E: [ 0.          0.13164239  0.26328478  0.39492717  0.52656957  0.65821196
  0.78985435  0.92149674  1.05313913  1.18478152  1.31642391  1.64552989
  1.97463587  2.30374185  2.63284783  2.96195381  3.29105978  3.62016576
  3.94927174  4.27837772  4.6074837   4.93658968  5.26569565  5.59480163
  5.92390761  6.25301359  6.58211957  7.24033152  7.89854348  8.55675544
  9.2149674   9.87317935 10.53139131 11.18960327 11.84781522 12.50602718
 13.16423914] meV
energy transfer: 0.0, 0.13820109295942837, 0.27640218591885674, ..., 27.502017498926246 meV
q vector shell centres: 0.42, 0.8066666666666665, 1.1933333333333334, ..., 3.8999999999999995 1/Ang

Next (and before starting the refinement), we set up the Simulation, which contains:

  • the Universe that the simulation is based on;

  • the MD engine used to run the simulations;

  • the time-step and trajectory step which we just determined;

  • the temperature of the Universe (used to calculate atom velocity);

[7]:
# MD Engine setup
simulation = Simulation(universe,
                        engine="openmm",
                        time_step=TIME_STEP_FS,
                        temperature=120.,
                        traj_step=FRAME_STEP,
                        )

md_observable.set_parameters({"correlation_frames": CORR_FRAMES})
Simulation created with openmm engine and settings:
temperature: 120.0 K


We then minimize and equilibrate the simulation; minimising the simulation avoids it getting ‘stuck’ in local minima, and equilibration runs the simulation until it reaches a state with a physically feasible temperature/energy distribution. This ensures our simulation isn’t affected by the initial arrangement of the atoms.

[8]:
# Energy Minimization and equilibration
simulation.run(n_steps=10000, equilibration=True)

We then need to create our parameters to fit against. In this case, we take all the universe parameters (which here are just the sigma and epsilon values that the Lennard-Jones potential depends on). Note that above when we set our initial LennardJones function in the Dispersion object, the epsilon and sigma were our “initial guesses” that the refinement will start from.

We also set constraints for our fitting parameters; we bound our sigma values to be between 2.8 and 3.8, and our epsilon to be between 0.6 and 1.4.

[9]:
fit_parameters = universe.parameters
fit_parameters['sigma'].constraints = [2.7,3.8]
fit_parameters['epsilon'].constraints = [0.5, 1.5]

Now we create our Control object. This object oversees the refinement; it brings the simulation, dataset, and the fitting parameters together, and then does the following:

  1. Run the simulation with the current parameters.

  2. Calculate the simulated observable from the simulation trajectory.

  3. Compare it to the experimental observable.

  4. Use a minimizer (optimisation process) to refine the parameters, bringing them closer to the experimental observable.

  5. Repeat with new parameters.

The minimizer we’re using in this tutorial is CMA-ES (Covariance Matrix Adaptation Evolution Strategy). During the optimisation procedure, both the MD trajectory and the simulated observable can be dumped to a file for further examination by loading it into an external package like MDANSE. File dumping can be set with the file_dump parameters seen in the code below. Each parameter controls how often the files are dumped, what their file names or locations will be:

  • file_dump_frequency: Defines how often the trajectory should be dumped to a H5MD file. Options available are “best” (only save the trajectory with the lowest FoM), “none” (don’t save any trajectories), and “every” (save every trajectory).

  • file_dump_extent: Which files should be written out in the dump. Options available are “traj” (H5MD trajectory file), “obs” (MDA MDANSE observable file), and “both” (both the H5MD trajectory and MDA observable files).

  • file_dump_loc: Location that the H5MD and/or MDA files should be stored at.

  • file_dump_timestamped: Whether a time stamp should be added to the output file names.

  • file_dump_prefix: The name the dumped H5MD and/or MDA file should be.

[10]:
control = Control(simulation=simulation,
                  exp_datasets=exp_datasets,
                  fit_parameters=fit_parameters,
                  observable_pairs= [observable_pair],
                  equilibration_steps=9000,
                  MD_steps=TOTAL_FRAMES,
                  cont_slicing=True,
                  data_printer='ipython',
                  file_dump_extent="all",
                  file_dump_frequency="every",
                  FoM_options={'error': 'none'},
                  file_dump_prefix="mdmc_argon_mdanse",
                  conv_tol = 1e-6,)

WARNING:root:`h5md_creator_name` not set, defaulting to: runner
WARNING:root:`h5md_creator_email` not set, defaulting to: runner@unknown
(3_w,6)-aCMA-ES (mu_w=2.0,w_1=63%) in dimension 2 (seed=453581, Wed Oct  7 10:49:14 2026)
RSquared_noneerror.calculate_single_FoM: norm_factor: 370
RSquared_noneerror.calculate_single_FoM: value_unreduced: 242.618298
RSquared_noneerror.calculate_single_FoM: A: 0.0
RSquared_noneerror.calculate_single_FoM: B: 242.618298
Rescale factor: 0.0
Control created with:
- Attributes                              -
  Minimizer                           CMAES
  FoM type               RSquared_noneerror
  Number of observables                   1
  Number of parameters                    2

Now that the dataset has been specified, and used to configure various processes and parameters, the system can be equilibrated.

[11]:
# Energy Minimization and equilibration
control.minimize(n_steps=5000)
control.equilibrate(n_steps=15000)

The number of MD_steps specified must be large enough to allow for statistically reasonable calculation of all observables. This depends the type of the dataset provided and the value of the traj_step (specified when creating the Simulation). If a value for MD_steps is not provided, then the minimum number needed will be used automatically.

Additionally, some observables will have an upper limit on the number of MD_steps that can be used in calculating their dependent variable(s). In these cases, the number of MD_steps is rounded down to a multiple of this upper limit so that we only run steps that will be useful. For example, if we use 1000 MD_steps in calculation, but a value of 2500 is provided, then we will run 2000 steps and use this to calculate the variable twice, without wasting time performing an additional 500 steps.

Finally, start the refinement! N_STEPS has been set to 2 just so you can see what a refinement looks like; it will take many more steps to fully refine a dataset. Bump it up to a higher number when you’re ready. Results can also be plotted via the control.plot_results method.

[12]:
N_STEPS=2
control.refine(n_steps=N_STEPS)  # Increase this number for a real run
if N_STEPS > 10:
    control.plot_results()
FoM CMA iteration epsilon (#2) sigma (#3)
Step
0 0.076531 1 1.000000 3.000000
1 0.023587 1 1.026094 3.095323
2 0.066494 1 0.679574 2.721440
Running MD for 10000 steps
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
Running multiple calculations for S(Q,w).
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_coherent"', 'output_files': '["/tmp/tmpu1dfdarr", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'projection': 'null', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_incoherent"', 'output_files': '["/tmp/tmp_q5my2jn", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Single-core run: expects 1 steps
INFO:MDANSE:Single-core job completed all the steps
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-49-34_traj.h5"', 'dcsf_input_file': '"/tmp/tmpu1dfdarr.mda"', 'disf_input_file': '"/tmp/tmp_q5my2jn.mda"', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'output_files': '["dummy_name", ["FileInMemory"], "no logs"]'}
RSquared_noneerror.calculate_single_FoM: norm_factor: 3990
RSquared_noneerror.calculate_single_FoM: value_unreduced: 242.61829564595686
RSquared_noneerror.calculate_single_FoM: A: 1.177021581429115e-06
RSquared_noneerror.calculate_single_FoM: B: 242.618298
Rescale factor: 4.851330633887783e-09
Running MD for 10000 steps
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
Running multiple calculations for S(Q,w).
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_coherent"', 'output_files': '["/tmp/tmp_ye7szz5", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'projection': 'null', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_incoherent"', 'output_files': '["/tmp/tmpgvn0ac9o", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Single-core run: expects 1 steps
INFO:MDANSE:Single-core job completed all the steps
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-51-41_traj.h5"', 'dcsf_input_file': '"/tmp/tmp_ye7szz5.mda"', 'disf_input_file': '"/tmp/tmpgvn0ac9o.mda"', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'output_files': '["dummy_name", ["FileInMemory"], "no logs"]'}
RSquared_noneerror.calculate_single_FoM: norm_factor: 3990
RSquared_noneerror.calculate_single_FoM: value_unreduced: 242.6182956389809
RSquared_noneerror.calculate_single_FoM: A: 1.1805095456285401e-06
RSquared_noneerror.calculate_single_FoM: B: 242.618298
Rescale factor: 4.865706978245063e-09
Running MD for 10000 steps
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
Running multiple calculations for S(Q,w).
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_coherent"', 'output_files': '["/tmp/tmp8njko881", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Multicore job finished: all subprocesses ended.
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5"', 'frames': '[0, 667, 1, 200]', 'instrument_resolution': '["ideal", {}]', 'q_vectors': '["SphericalLatticeQVectors", {"shells": [4.2, 39.38666666666667, 3.8666666666666667], "width": 3.8666666666666667, "n_samples": 100000, "n_vectors": 1000, "seed": 0, "force_equal_weights": false}]', 'projection': 'null', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'weights': '"b_incoherent"', 'output_files': '["/tmp/tmpapr0w9ln", ["MDAFormat"], "no logs"]', 'running_mode': '["multicore", -8]'}
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
WARNING:MDANSE:/home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5 does not contain version information. This may be because it is very old or is not a valid MDANSE file. If you run into issues, consider regenerating the file with this version of MDANSE.
WARNING:MDANSE:Could not load ChemicalSystem from /home/runner/work/MDMC/MDMC/doc/tutorials/mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5. MDANSE will try to read it as H5MD next.
INFO:MDANSE:No velocity block in input.
INFO:MDANSE:Single-core run: expects 1 steps
INFO:MDANSE:Single-core job completed all the steps
INFO:MDANSE:{'trajectory': '"mdmc_argon_mdanse_for_mdanse_2026-10-07--10-53-47_traj.h5"', 'dcsf_input_file': '"/tmp/tmp8njko881.mda"', 'disf_input_file': '"/tmp/tmpapr0w9ln.mda"', 'grouping_level': '"atom"', 'atom_selection': '"{\\n        \\"0\\": {\\"function_name\\": \\"select_all\\", \\"operation_type\\": \\"union\\"},\\n        \\"1\\": {\\"function_name\\": \\"select_dummy\\", \\"operation_type\\": \\"difference\\"}\\n    }"', 'atom_transmutation': '"{}"', 'output_files': '["dummy_name", ["FileInMemory"], "no logs"]'}
RSquared_noneerror.calculate_single_FoM: norm_factor: 3990
RSquared_noneerror.calculate_single_FoM: value_unreduced: 242.61829614585938
RSquared_noneerror.calculate_single_FoM: A: 9.27070322578523e-07
RSquared_noneerror.calculate_single_FoM: B: 242.618298
Rescale factor: 3.821106364279759e-09

The refinement has not converged.

Last accepted point is:
(0.6795739268772618, 2.721439653152379) with a minimum
FoM of 0.0664937589153332.

Best point measured was:
(1.026094224447839, 3.0953230603092767) for a minimum FoM of
0.023586823677781976.


Automatic Scale Factors
data/Well_s_q_omega_Ar_data.xml  3.821106e-09