本文整理匯總了Python中xia2.Handlers.Flags.Flags.get_fixed_628方法的典型用法代碼示例。如果您正苦於以下問題:Python Flags.get_fixed_628方法的具體用法?Python Flags.get_fixed_628怎麽用?Python Flags.get_fixed_628使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類xia2.Handlers.Flags.Flags
的用法示例。
在下文中一共展示了Flags.get_fixed_628方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: continue_from_error
# 需要導入模塊: from xia2.Handlers.Flags import Flags [as 別名]
# 或者: from xia2.Handlers.Flags.Flags import get_fixed_628 [as 別名]
#.........這裏部分代碼省略.........
if self._indexing_solutions[lattice][
'goodness'] < fit:
continue
self._indexing_solutions[lattice] = {
'goodness':fit,
'cell':cell}
# postprocess this list, to remove lattice solutions which are
# lower symmetry but higher penalty than the putative correct
# one, if self._symm is set...
if self._symm:
assert len(self._indexing_solutions) > 0, "No remaining indexing solutions (%s, %s)" % (s2l(self._symm), self._symm);
else:
assert len(self._indexing_solutions) > 0, "No remaining indexing solutions"
# print self._indexing_solutions
if self._symm:
max_p = 2.0 * self._indexing_solutions[
s2l(self._symm)]['goodness']
to_remove = []
for lattice in self._indexing_solutions:
if self._indexing_solutions[lattice]['goodness'] > max_p:
to_remove.append(lattice)
for lattice in to_remove:
Debug.write('Ignoring solution with lattice %s' % \
lattice)
del(self._indexing_solutions[lattice])
# get the highest symmetry "acceptable" solution
list = [(k, self._indexing_solutions[k]['cell']) for k in \
self._indexing_solutions.keys()]
# if there was a preassigned cell and symmetry return now
# with everything done, else select the "top" solution and
# reindex, resetting the input cell and symmetry.
if self._cell:
# select the solution which matches the input unit cell
# actually after the changes above this should now be the
# only solution in the table..
Debug.write(
'Target unit cell: %.2f %.2f %.2f %.2f %.2f %.2f' % \
self._cell)
for l in list:
if lattice_to_spacegroup_number(l[0]) == self._symm:
# this should be the correct solution...
# check the unit cell...
cell = l[1]
if self._compare_cell(self._cell, cell) \
or not Flags.get_fixed_628():
cell_str = '%.2f %.2f %.2f %.2f %.2f %.2f' % cell
Debug.write(
'Chosen unit cell: %s' % cell_str)
self._indxr_lattice = l[0]
self._indxr_cell = l[1]
self._indxr_mosaic = mosaic
else:
cell_str = '%.2f %.2f %.2f %.2f %.2f %.2f' % cell
Debug.write(
'Ignoring unit cell: %s' % cell_str)
else:
# select the top solution as the input cell and reset the
# "indexing done" flag
sorted_list = SortLattices(list)
# print sorted_list
self._symm = lattice_to_spacegroup_number(sorted_list[0][0])
self._cell = sorted_list[0][1]
return False
# get the refined distance &c.
beam, distance = _parse_idxref_lp_distance_etc(lp)
self._refined_beam = beam
self._refined_distance = distance
# gather the output files
for file in self._output_data_files_list:
self._output_data_files[file] = os.path.join(
self.get_working_directory(), file)
return True