Changeset 4527
- Timestamp:
- Jul 19, 2020 11:21:51 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwd.py
r4523 r4527 2776 2776 if angle[3] == angle[4] or angle[5] >= angle[6] or angle[6] <= 0: 2777 2777 continue 2778 for i in (0,1,2): 2779 angle[i] = angle[i].strip() 2778 2780 AngleList.append(angle) 2779 2781 rmin = RMCPdict['min Contact'] … … 2879 2881 print('What is this?') 2880 2882 rundata += ' ENGINE.add_constraints(DistanceConstraint(defaultLowerDistance={}))\n'.format(RMCPdict['min Contact']) 2881 rundata += ''' B_CONSTRAINT = BondConstraint() 2883 if BondList: 2884 rundata += ''' B_CONSTRAINT = BondConstraint() 2882 2885 ENGINE.add_constraints(B_CONSTRAINT) 2883 2886 B_CONSTRAINT.create_supercell_bonds(bondsDefinition=[ 2884 2887 ''' 2885 for pair in BondList: 2886 e1,e2 = pair.split('-') 2887 rundata += ' ("element","{}","{}",{},{}),\n'.format( 2888 e1.strip(),e2.strip(),*BondList[pair]) 2889 rundata += ''' ]) 2888 for pair in BondList: 2889 e1,e2 = pair.split('-') 2890 rundata += ' ("element","{}","{}",{},{}),\n'.format( 2891 e1.strip(),e2.strip(),*BondList[pair]) 2892 rundata += ' ])\n' 2893 if AngleList: 2894 rundata += ''' A_CONSTRAINT = BondsAngleConstraint() 2895 ENGINE.add_constraints(A_CONSTRAINT) 2896 A_CONSTRAINT.create_supercell_angles(anglesDefinition=[ 2897 ''' 2898 for item in AngleList: 2899 rundata += (' '+ 2900 '("element","{1}","{0}","{2}",{5},{6},{5},{6},{3},{4}),\n'.format(*item)) 2901 rundata += ' ])\n' 2902 rundata += ''' 2890 2903 ENGINE.save() 2891 2904 else: -
trunk/GSASIIscriptable.py
r4518 r4527 846 846 PathWrap("inst_d1a.prm"),5.,120.,Npoints=1000, 847 847 phases=gpx.phases(),scale=500000.) 848 gpx.do_refinements( [{}]) # calculate pattern848 gpx.do_refinements() # calculate pattern 849 849 gpx.save() 850 850 # save results … … 2811 2811 p.id = i 2812 2812 2813 def do_refinements(self, refinements , histogram='all', phase='all',2813 def do_refinements(self, refinements=[{}], histogram='all', phase='all', 2814 2814 outputnames=None, makeBack=False): 2815 2815 """Conducts one or a series of refinements according to the … … 2818 2818 2819 2819 :param list refinements: A list of dictionaries specifiying changes to be made to 2820 parameters before refinements are conducted. 2820 parameters before refinements are conducted. 2821 2821 See the :ref:`Refinement_recipe` section for how this is defined. 2822 If not specified, the default value is ``[{}]``, which performs a single 2823 refinement step is performed with the current refinement settings. 2822 2824 :param str histogram: Name of histogram for refinements to be applied 2823 2825 to, or 'all'; note that this can be overridden for each refinement … … 4346 4348 N = len(x) 4347 4349 unit = 'millisec' 4348 else: 4350 limits = [(1000*Tmin, 1000*Tmax), [1000*Tmin, 1000*Tmax]] 4351 else: 4349 4352 if Npoints: 4350 4353 N = Npoints … … 4356 4359 N = len(x) 4357 4360 unit = 'degrees 2theta' 4361 limits = [(Tmin, Tmax), [Tmin, Tmax]] 4358 4362 if N < 3: 4359 4363 raise G2ScriptException("Error: Range is too small or step is too large, <3 points") … … 4367 4371 np.zeros_like(x), # obs-calc profiles 4368 4372 ] 4369 self.data['Limits'] = [(1000*Tmin, 1000*Tmax), [1000*Tmin, 1000*Tmax]]4373 self.data['Limits'] = limits 4370 4374 4371 4375 def getHistEntryList(self, keyname=''):
Note: See TracChangeset
for help on using the changeset viewer.