ContinuousRandomNetwork

class ContinuousRandomNetwork(temperature=None, heating_rate=None, chain_length=None, find_bonds=None, optimize_geometry_parameters=None, random_seed=None)

Define a continuous random network (CRN) Monte Carlo method.

Parameters:
  • temperature (PhysicalQuantity of type temperature) – The initial temperature of the Monte Carlo simulation.
    Default: 300.0 * Kelvin

  • heating_rate (PhysicalQuantity of type temperature) – The change in temperature per step. A negative temperature results in the simulation cooling at each step.
    Default: 0.0 * Kelvin

  • chain_length (int) – The length of the chain between the two bonds to switch.
    Default: 1

  • find_bonds (bool) – Whether the bonding network will be automatically determined using the initial configuration; otherwise, the bonds to use must already be set on the configuration.
    Default: True

  • optimize_geometry_parameters (OptimizeGeometryParameters) – The parameters to use for relaxing configurations. Note that pre_step_hook and post_step_hook must be left unset. Also note that only max_forces, max_steps, max_step_length, constraints and optimizer_method will be used; all other parameters will be ignored.
    Default: OptimizeGeometryParameters()

  • random_seed (int) – The random seed used for generating trial Monte Carlo steps.
    Default: Generated automatically.

chainLength()
Returns:

The length of the chain between the two bonds to switch.

Return type:

int

findBonds()
Returns:

Whether the bonding network will be automatically determined using the initial configuration.

Return type:

bool

heatingRate()
Returns:

The change in temperature per step, or None for no heating.

Return type:

PhysicalQuantity of type temperature | None

monteCarloStep(configuration, energy)

Perform a bond switch Monte Carlo step and relax the configuration with the new bonding network.

Parameters:
Returns:

The new configuration and energy resulting from the trial step.

Return type:

tuple (size 2) of (MoleculeConfiguration | BulkConfiguration | DeviceConfiguration | SurfaceConfiguration, PhysicalQuantity of type energy)

optimizeGeometryParameters()
Returns:

Parameters required to optimize the geometry.

Return type:

OptimizeGeometryParameters

randomSeed()
Returns:

The random seed used for performing Monte Carlo steps.

Return type:

int

temperature()
Returns:

The initial temperature of the Monte Carlo simulation.

Return type:

PhysicalQuantity of type temperature

uniqueString()

Return a unique string representing the state of the object.

Usage Examples

Perform a Metropolis Monte Carlo simulation of 100 steps using the ContinuousRandomNetwork model.

# Define the Monte Carlo method. Note here the temperature changes from the initial 50500 to
# 500K
monte_carlo_method = ContinuousRandomNetwork(
    temperature=50500.0*Kelvin,
    heating_rate=-500.0*Kelvin,
    chain_length=1
)

# Perform the Monte Carlo simulation
monte_carlo_trajectory = MetropolisMonteCarlo(
    configuration=alpha_silicon,
    trajectory_filename='Amorphous_Silicon.hdf5',
    steps=100,
    max_trial_moves=5000,
    log_interval=1,
    method=monte_carlo_method,
    trajectory_object_id=None
)
last_image = monte_carlo_trajectory.lastImage()
nlsave('Amorphous_Silicon.hdf5', last_image)

continuous_random_network_example.py

In the above example the simulation starts with crystalline alpha-silicon. During the simulation changing the bonding between silicon atoms generates an amorphous structure while still preserving the number of bonds at each silicon. Note that in this simulation a high initial temperature is used so that the configuration is able to get out of the global energy minimum. As the simulation progress the temperature is lowered as less energy is required to perform subsequent bond swap moves. At low temperatures the selected can also lower the overall energy of the amorphous structure.

Notes

The ContinuousRandomNetwork class defines a Monte Carlo model that can be used in the MetropolisMonteCarlo() method. This Monte Carlo model defines bond swap moves that can be used to generate amorphous configurations. In each trial move, a pair of bonds that are separated by a set number of bonds are exchanged. A relaxation is then performed with an added bond and angle potential on the swapped bonds to return the new bonds back to equilibrium bond lengths and angles. The main advantage of generating trial configurations in this way is that it helps to preserve the bonding geometry around each atom while also moving atoms away from their lattice positions.

The number of bonds between swapped bonds is set by the argument chain_length. This can be set so that only like bonds in the material are swapped. For single element materials, such as silicon, the default value of 1 is appropriate. For binary materials, such as silica, a value of 2 should be used to ensure that only silicon-oxygen bonds are exchanged.