Loading lib/galaxy/datatypes/test/YbCuAs2.den_fmt 0 → 100644 +13 −0 Original line number Diff line number Diff line BEGIN header Real Lattice(A) Lattice parameters(A) Cell Angles 3.8420000 0.0000000 0.0000000 a = 3.842000 alpha = 90.000000 0.0000000 3.8420000 0.0000000 b = 3.842000 beta = 90.000000 0.0000000 0.0000000 9.7430000 c = 9.743000 gamma = 90.000000 2 ! nspins 32 32 90 ! fine FFT grid along <a,b,c> END header: data is "<a b c> charge spin" in units of electrons/grid_point * nu mber of grid_points 1 1 1 47.798968 0.000070 No newline at end of file lib/galaxy/datatypes/text.py +9 −1 Original line number Diff line number Diff line Loading @@ -1188,6 +1188,9 @@ class FormattedDensity(Text): >>> fname = get_test_fname('Si.den_fmt') >>> FormattedDensity().sniff(fname) True >>> fname = get_test_fname('YbCuAs2.den_fmt') >>> FormattedDensity().sniff(fname) True >>> fname = get_test_fname('Si.param') >>> FormattedDensity().sniff(fname) False Loading @@ -1195,6 +1198,11 @@ class FormattedDensity(Text): begin_header = "BEGIN header" end_header = 'END header: data is "<a b c> charge" in units of electrons/grid_point * number' grid_points = "of grid_points" end_header_spin = 'END header: data is "<a b c> charge spin" in units of electrons/grid_point * nu' grid_points_spin = "mber of grid_points" handle = file_prefix.string_io() lines = handle.readlines() return lines[0].strip() == begin_header and lines[9].strip() == end_header and lines[10].strip() == grid_points return lines[0].strip() == begin_header and ( (lines[9].strip() == end_header and lines[10].strip() == grid_points) or (lines[9].strip() == end_header_spin and lines[10].strip() == grid_points_spin) ) Loading
lib/galaxy/datatypes/test/YbCuAs2.den_fmt 0 → 100644 +13 −0 Original line number Diff line number Diff line BEGIN header Real Lattice(A) Lattice parameters(A) Cell Angles 3.8420000 0.0000000 0.0000000 a = 3.842000 alpha = 90.000000 0.0000000 3.8420000 0.0000000 b = 3.842000 beta = 90.000000 0.0000000 0.0000000 9.7430000 c = 9.743000 gamma = 90.000000 2 ! nspins 32 32 90 ! fine FFT grid along <a,b,c> END header: data is "<a b c> charge spin" in units of electrons/grid_point * nu mber of grid_points 1 1 1 47.798968 0.000070 No newline at end of file
lib/galaxy/datatypes/text.py +9 −1 Original line number Diff line number Diff line Loading @@ -1188,6 +1188,9 @@ class FormattedDensity(Text): >>> fname = get_test_fname('Si.den_fmt') >>> FormattedDensity().sniff(fname) True >>> fname = get_test_fname('YbCuAs2.den_fmt') >>> FormattedDensity().sniff(fname) True >>> fname = get_test_fname('Si.param') >>> FormattedDensity().sniff(fname) False Loading @@ -1195,6 +1198,11 @@ class FormattedDensity(Text): begin_header = "BEGIN header" end_header = 'END header: data is "<a b c> charge" in units of electrons/grid_point * number' grid_points = "of grid_points" end_header_spin = 'END header: data is "<a b c> charge spin" in units of electrons/grid_point * nu' grid_points_spin = "mber of grid_points" handle = file_prefix.string_io() lines = handle.readlines() return lines[0].strip() == begin_header and lines[9].strip() == end_header and lines[10].strip() == grid_points return lines[0].strip() == begin_header and ( (lines[9].strip() == end_header and lines[10].strip() == grid_points) or (lines[9].strip() == end_header_spin and lines[10].strip() == grid_points_spin) )