MakeTrajectory¶
- MakeTrajectory(configuration_list, analysis=None, **kwargs)¶
Construct a trajectory sequence of configurations, from a given nudged elastic band configuration, or a list of configurations.
- Parameters:
configuration_list (list of configurations |
NudgedElasticBand
.) – Either an explicit list of configurations (each of typeMoleculeConfiguration
|BulkConfiguration
|DeviceConfiguration
|SurfaceConfiguration
), or aNudgedElasticBand
configuration object.analysis (class) – The analysis class that will be applied across the configurations, e.g.
Forces
. Default: No analysis is performed.**kwargs – Any additional keyword arguments will be passed to the constructor of the class given in the
analysis
argument.
Usage Examples¶
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)