added copyToLocalCoords function to fix a bug in writing pdb files for loading into pymol