![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The LoadXTC command restores the atom positions in the selected objects from the specified trajectory file.
If all atoms are selected and a simulation cell is present and YASARA Dynamics+ is installed,
then LoadXTC additionally adjusts the simulation cell,
updates the simulation time and continues the simulation. You can avoid the latter feature by
pausing the simulation before. Other simulation parameters like force field,
cutoff, long range forces and boundary conditions must be set before calling LoadXTC and should match the conditions when the snapshot
was saved. If only a subset of atoms is selected or no simulation cell is present,
LoadXTC additionally applies the transformation history of the target object to the newly loaded atom coordinates. This makes sure that atoms do not jump back to the original coordinate system if you
centered the object in the mean time. This procedure assumes that the atom coordinates in the initial PDB file and the XTC trajectory match. If the XTC trajectory was created with YASARA,
you have to save the initial PDB file during the simulation without the 'Transform' option.
Note that the XTC format does not store atom velocities. If you continue a simulation from an XTC snapshot,
the atom positions will not match the random velocities assigned by YASARA. The result is an immediate jump in temperature.
The 'assignSec' flag can be used to suppress the reassignment of secondary structure. This is helpful when playing back a simulation to avoid distracting secondary structure changes.
If you load an XTC trajectory created with a program other than YASARA,
set YASARA to a right-handed coordinate system
first.
# EXAMPLE MACRO FOR PLAYING BACK A TRAJECTORY
Clear
LoadPDB 1crn
Clean
Console Off
snapshot=1
while 1
eof = LoadXTCObj 1crn,1crn_trajectory,(snapshot)
snapshot=snapshot+1
if eof
# End Of File, start from 1 again
snapshot=1
Wait 5
Based on the return values of LoadXTC
for the cell parameters, you can also create the cell yourself:
# EXAMPLE MACRO FOR CREATING A SIMULATION CELL eof,t,a,b,c,alpha,beta,gamma = LoadXTC 1crn,1crn_trajectory,50 # Create the cell Cell (a),(b),(c),(alpha),(beta),(gamma) # Transfer the cell to the coordinate system of 1crn TransferObj SimCell,1crn An example for converting a list of PDB files to an XTC trajectory
is provided at the SaveXTC command.
Example 1:LoadXTC 1crn_trajectory,20 Load all atom positions from the 20th snapshot in 1crn_trajectory,
1crn_trajectory.xtc or sim/1crn_trajectory.xtc. If a cell is present, additionally adjust the cell parameters and simulation time and continue the simulation.
Example 2:LoadXTCObj 1crn,1crn_trajectory,50,assignSec=No Load atom positions in object 1crn from the 50th snapshot in the trajectory but do not reassign the secondary structure.
Example 3:eof,t,a,b,c,alpha,beta,gamma = LoadXTC 1crn,1crn_trajectory,50 As above, but set variable 'eof' to 1 if snapshot 50 is the last in the trajectory,
store the time in 't' and the simulation cell parameters in the six specified variables.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||