Prepend a new conformation to a trajectory (DS 2.1)

PURPOSE: Reads in a file containing 1 molecule and adds the coordinates of that molecule to a new conformation in the existing 3D window. The script requires that the atoms in each molecular system are identical (i.e. have the same atom names). It also requires that the existing 3D window already contains Conformations. The added conformation will be the FIRST conformation (i.e. prepended to the beginning of the trajectory) and it is given the Name 'Crystal' and the ID '1'. The IDs of all other frames in the original trajectory will be shifted up by one.
This script is useful if you wish to compare coordinates in a trajectory to the input coordinates or crystal structure.
By adding the initial coordinates to the trajectory one can then use the Analyze Trajectory protocol to calculate the RMSD values relative to the initial/crystal structure.

INSTALLATION: Save AddConformationFromFile.pl to a local directory or location accessible from the Files Explorer

USAGE: From the DS Client: From the Files Explorer, double-click on the AddConformationFromFile.pl to launch the script or right-click on the file and select Open With | Script Window then launch the script using the Run command from the Scripting toolbar.

DISCLAIMER: This custom script is compatible with Discovery Studio 2.1. It is provided "as is" and is NOT supported by Accelrys nor is it warranted for any purpose whatsoever. The user assumes responsibility for any malfunctions or bugs.

REQUIREMENTS: A 3D window containing Conformations. Modify line #53 to specify input file.

EXPECTED RESULTS: A new conformation with the ID # 1 will be prepending to the existing Conformations in the Active 3D Window. All previously existing conformations will have their ID values shifted up by 1.

The attached .zip contains:
1. A README.txt
2. The AddConformationFromFile.pl DiscoveryScript