dump_xyz
Write per-atom data into user-specified file(s) in extended XYZ format.
Runs using multi_replica use the replica trajectory syntax instead of the ordinary MD syntax below.
Syntax
dump_xyz <interval> <filename> [group <grouping_method> <group_id>] [precision <single|double>] [split <frames_per_file>] {<property_1> <property_2> ...}
Parameters
intervalis the output interval (number of steps) of the data.filenameis the output file.If it ends in
*, each frame is written to a separate file, with the star replaced by the step number.The optional
splitparameter is the maximum number of frames written per XYZ file (a positive integer). For example,dump_xyz 100 trajectory.xyz split 10000writes 10000 frames totrajectory_0001.xyz, then 10000 frames totrajectory_0002.xyz, and so on. The final file can contain fewer frames. Existing numbered files are skipped to avoid overwriting data when restarting or issuing anotherruncommand. Thesplitoption cannot be used with a filename ending in*.The
groupoption restricts the output to the atoms in groupgroup_idof grouping methodgrouping_method.Without this option, all atoms are written.
The
precisionoption controls the number of significant digits written for every floating-point value.single(default) writes nine significant digits;doublewrites 17. These preserve single- and double-precision values, respectively.Then one can write the properties to be output, and the allowed properties include:
mass,velocity,force,potential,virial,charge,bec,group_labels,spin,mforce,unwrapped_position, andunwrapped_position_only.group_labelswrites one integer column per grouping method, containing each atom’s group label.The wrapped positions are included by default. The
unwrapped_positionoption writes both wrapped and unwrapped positions. Theunwrapped_position_onlyoption writes only unwrapped positions. Theunwrapped_positionandunwrapped_position_onlyoptions are mutually exclusive.
Output
The requested per-atom properties are written to the specified extended XYZ file(s).
Examples
# dump positions every 1000 steps, for the whole system:
dump_xyz 1000 positions.xyz
# dump wrapped and unwrapped positions, plus velocities:
dump_xyz 15 both.xyz unwrapped_position velocity
# dump only unwrapped positions, plus velocities:
dump_xyz 15 dump.xyz unwrapped_position_only velocity
# dump many other quantities every 100 steps, for atoms in group 0 of grouping method 1:
dump_xyz 100 properties.xyz group 1 0 mass velocity potential force virial
# dump forces with the full precision of the underlying double-precision values:
dump_xyz 100 forces.xyz precision double force
# dump 10000 frames per file, with one frame every 100 steps:
dump_xyz 100 trajectory.xyz split 10000
run 1000000
Notes
Repeat this command before each run that needs this output.
With no
splitoption or trailing*, the output file has an appending behavior. Withsplit, each run creates new numbered files without overwriting existing chunks.Different from many of the other keywords, this keyword is allowed to be invoked multiple times within one run.
For qNEP models, the charge values dumped out are predicted by the qNEP models. For other models, the charge values are those specified in
model.xyzviacharge:R:1.The Born effective charge (BEC) is only meaningful for a qNEP model trained with target BEC.
spinandmforceare three-component vectors that require both a NEP-spin model andspin:R:3inmodel.xyz. The XYZ property alone does not enable these outputs for other potential models.The per-atom
virialproperty contains all nine row-major componentsxx xy xz yx yy yz zx zy zz. NEP_Spin does not symmetrize this per-atom tensor.
The spin_velocity option writes spin_vel:R:3 in
\(\mu_B/\mathrm{fs}\). It requires a NEP-spin model, spin:R:3, and
velocities initialized by TSPIN or supplied as spin_vel:R:3 in
model.xyz. Ordinary models ignore additional spin input properties.