MakeTrajectory — Construct a trajectory sequence of configurations, from a given Nudged Elastic Band configuration, or a list of configurations.
Construct a trajectory sequence of configurations, from a given Nudged Elastic Band configuration, or a list of configurations.
Either an explicit tuple or list of configurations, or a NudgedElasticBand configuration object.
Type: tuple/list of configurations or NudgedElasticBand.
The analysis class that will be applied across the configurations. If None, no analysis is applied.
Type: A supported Analysis class name - e.g. Forces.
Default:
None
Any unnamed arguments beyond the first two - these are not used, and the method will throw an exception on encountering any.
Type: All non-keyword arguments.
The dictionary of supplied keyword arguments that will be passed to the analysis class across configurations.
Type: All keyword arguments.
Create a Trajectory object from a list of configurations.
# Define elements.
elements = [Oxygen, Hydrogen, Hydrogen]
# Define coordinates.
c0 = [[ 0.00, 0.00, 0.12],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
c1 = [[ 0.00, 0.00, 0.20],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
c2 = [[ 0.00, 0.00, 0.28],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
c3 = [[ 0.00, 0.00, 0.36],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
# Define the coordinate list.
coordinates = [c0, c1, c2, c3]
# Set up a list of configurations.
configuration_list = [ MoleculeConfiguration(elements,c) for c in coordinates ]
# Create a Trajectory only - no analysis.
t = MakeTrajectory(configuration_list)
# Define calculators on each configuration - for analysis.
for c in configuration_list:
c.setCalculator(LCAOCalculator())
# Create a Trajectory with a TotalEnergy analysis carried out on each configuration.
t = MakeTrajectory(configuration_list, TotalEnergy)
Create a Trajectory object from a NudgedElasticBand object.
# Define elements.
elements = [Oxygen, Hydrogen, Hydrogen]
# Define coordinates.
c0 = [[ 0.00, 0.00, 0.12],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
c1 = [[ 0.00, 0.00, 1.20],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
# Set up a list of configurations.
configuration_list = [ MoleculeConfiguration(elements,c) for c in [c0,c1] ]
# Create the NudgedElasticBand object.
neb = NudgedElasticBand(configuration_list)
# Set a calculator on the configurations in the NEB - for analysis.
neb.setCalculator(LCAOCalculator())
# Create a Trajectory with a TotalEnergy analysis carried out on each configuration.
t = MakeTrajectory(neb, TotalEnergy)