Author: bugman Date: Wed Jun 19 10:17:06 2013 New Revision: 20206 URL: http://svn.gna.org/viewcvs/relax?rev=20206&view=rev Log: Fix for bug #20917 (https://gna.org/bugs/?20917). The problem is that the Grace files for each spin system are not created by the relax_disp.plot_disp_curves user function as the ':' character cannot be placed in a file name in MS Windows. All of the file name from the ':' onwards is lost. The solution is to replace each of the characters '#:@' in the spin ID string with '_'. Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=20206&r1=20205&r2=20206&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Wed Jun 19 10:17:06 2013 @@ -35,6 +35,7 @@ # Python module imports. from math import pi, sqrt from numpy import float64, int32, ones, zeros +from string import replace # relax module imports. from lib.errors import RelaxError, RelaxNoSpectraError, RelaxSpinTypeError @@ -383,8 +384,10 @@ # Loop over each spin. for spin, spin_id in spin_loop(return_id=True, skip_desel=True): + # The unique file name. + file_name = "disp%s.agr" % replace(replace(replace(spin_id, '#', '_'), ':', '_'), '@', '_') + # Open the file for writing. - file_name = "disp_%s.agr" % spin_id file_path = get_file_path(file_name, dir) file = open_write_file(file_name, dir, force)