Tutorials‎ > ‎PDB Files‎ > ‎

Step 5

This step is not needed for the PKA example because all parts of the system that are to be simulated from the original PDB file are treated together. However, when this is not the case, a suitable "merging" program is:

# . Specify the file names containing the systems to merge. pklFiles = [ "part1.pkl", "part2.pkl", "part3.pkl" ] # . Recover the systems from the files. parts = [] for pklFile in pklFiles: parts.append ( Unpickle ( pklFile ) ) # . Merge the systems. system = MergeByAtom ( parts ) # . Save the new system. Pickle ( "step5.pkl", system )

The program first places the separate parts of the system into a list by unpickling the appropriate files and then creates and saves the merged system. In this example there are three parts, but there can be any number. It is important to remember that the parts will appear in the merged system in the same order as they occur in the list, parts, that is passed to the function MergeByAtom.