../fullrmc/Examples/frames/
Refer to atomicNiTi example.
PairDistributionConstraint
and
ReducedStructureFactorConstraint
constraints data.IMPORTING USEFUL DEFINITIONS:
All useful packages, modules and definitions are imported.
CREATE ENGINE:
Check if engine already saved on disk. In the affirmative load it to continue
fitting from last saved configuration. Otherwise, build the engine and the needed
constraints. In this particular example, ‘experimental.fq’ has no regular bins.
Therefore, rebinning it needs to be rebinned using ‘fullrmc.Core.Collection.rebin’
function. Even though engine contains AtomicCoordinationNumberConstraint
we decided to discard this constraint upon fitting by using set_used method and
assigned ‘used’ flag to False.
DIFFERENT RUNS:
Define functions to run the fitting engine. All of the following functions finish running the engine using Engine.run method.
RandomSelector
and
random atomic translations using TranslationGenerator
move generator.SwapPositionsGenerator
for swapping Nickel atoms
with Titanium and the other the opposite. Loop over all engine’s groups, check
whether group’s atom is Nickel or Titanium and assign it respectively
SwapPositionsGenerator
to Titanium atoms and another
SwapPositionsGenerator
to Nickel atoms.
Advanced users can change AtomicCoordinationNumberConstraint
used flag
to True and try playing with the given coordination number definition and improve
the fit quality and the physical meaning of the final structure.RUN no_constraints:
Rename default frame ‘0’ to ‘no_constraints’ then set atomic both coordination number and intermolecular distance constraints used flag to False. Then call run_normal and run_swap fitting routines.
RUN with_vdw:
Create new frame ‘with_vdw’ and set it as used. then set atomic coordination number used flag to False and intermolecular distance constraints used flag to True. Then call run_normal and run_swap fitting routines.
RUN all_constraints:
Create new frame ‘all_constraints’ and set it as used. then set both atomic coordination number and intermolecular distance constraints used flag to True. Then call run_normal and run_swap fitting routines.
PLOT PDF CONSTRAINT:
Plotting simultaneously all frames PairDistributionConstraint
and
ReducedStructureFactorConstraint
data after fitting.