Author: bugman Date: Thu Nov 22 11:48:15 2012 New Revision: 18019 URL: http://svn.gna.org/viewcvs/relax?rev=18019&view=rev Log: The absolute path to PDB and XYZ 3D structure files is now kept in the relax data store. This is for both the internal PDB and XYZ reader, and the Scientific Python PDB reader. Modified: branches/frame_order_testing/generic_fns/structure/internal.py branches/frame_order_testing/generic_fns/structure/scientific.py Modified: branches/frame_order_testing/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/structure/internal.py?rev=18019&r1=18018&r2=18019&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/structure/internal.py (original) +++ branches/frame_order_testing/generic_fns/structure/internal.py Thu Nov 22 11:48:15 2012 @@ -25,7 +25,8 @@ # Python module imports. from numpy import array, dot, float64, linalg, zeros import os -from os import F_OK, access +from os import F_OK, access, curdir, sep +from os.path import abspath from re import search from string import digits from warnings import warn @@ -1067,6 +1068,9 @@ # Separate the file name and path. path, file = os.path.split(file_path) + # The absolute path. + path_abs = abspath(curdir) + sep + path + # Convert the structure reading args into lists. if read_mol and not isinstance(read_mol, list): read_mol = [read_mol] @@ -1136,7 +1140,7 @@ return False # Create the structural data data structures. - self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=orig_mol_num, set_mol_name=new_mol_name, file_name=file, file_path=path) + self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=orig_mol_num, set_mol_name=new_mol_name, file_name=file, file_path=path, file_path_abs=path_abs) # Loading worked. return True @@ -1180,6 +1184,9 @@ # Separate the file name and path. path, file = os.path.split(file_path) + # The absolute path. + path_abs = abspath(curdir) + sep + path + # Convert the structure reading args into lists. if read_mol and not isinstance(read_mol, list): read_mol = [read_mol] @@ -1242,7 +1249,7 @@ orig_mol_num=[0] # Create the structural data data structures. - self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=orig_mol_num, set_mol_name=new_mol_name, file_name=file, file_path=path) + self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=orig_mol_num, set_mol_name=new_mol_name, file_name=file, file_path=path, file_path_abs=path_abs) # Loading worked. return True Modified: branches/frame_order_testing/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/structure/scientific.py?rev=18019&r1=18018&r2=18019&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/structure/scientific.py (original) +++ branches/frame_order_testing/generic_fns/structure/scientific.py Thu Nov 22 11:48:15 2012 @@ -29,7 +29,8 @@ from math import sqrt from numpy import array, dot, float64, linalg, zeros import os -from os import F_OK, access, sep +from os import F_OK, access, curdir, sep +from os.path import abspath from extern.scientific_python.IO import PDB import sys from warnings import warn @@ -593,6 +594,9 @@ # Separate the file name and path. path, file = os.path.split(file_path) + # The absolute path. + path_abs = abspath(curdir) + sep + path + # Convert the structure reading args into lists. if read_mol and not isinstance(read_mol, list): read_mol = [read_mol] @@ -720,7 +724,7 @@ model_load_num = model_load_num + 1 # Create the structural data data structures. - self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=list(range(1, len(mol_conts[0])+1)), set_mol_name=new_mol_name, file_name=file, file_path=path) + self.pack_structs(mol_conts, orig_model_num=orig_model_num, set_model_num=set_model_num, orig_mol_num=list(range(1, len(mol_conts[0])+1)), set_mol_name=new_mol_name, file_name=file, file_path=path, file_path_abs=path_abs) # Loading worked. return True