- Timestamp:
- Mar 22, 2020 8:33:59 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4375 r4378 4599 4599 def OnRMCselect(event): 4600 4600 G2frame.RMCchoice = RMCsel.GetStringSelection() 4601 # G2frame.runtext.SetValue('')4602 4601 UpdateRMC() 4603 4602 4604 4603 G2frame.GetStatusBar().SetStatusText('',1) 4605 4604 if G2frame.RMCchoice == 'RMCProfile': 4605 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,True) 4606 4606 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_LOADRMC,False) 4607 4607 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SAVERMC,False) 4608 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,True) 4609 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,True) 4608 4610 elif G2frame.RMCchoice == 'fullrmc': 4609 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_LOADRMC,True) 4610 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SAVERMC,True) 4611 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,False) 4612 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_LOADRMC,False) 4613 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SAVERMC,False) 4614 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,False) 4615 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,False) 4616 wx.MessageBox(''' fullrmc is not correctly installed for use in GSAS-II 4617 Install it in your python according to the instructions in 4618 https://bachiraoun.github.io/fullrmc/index.html. ''', 4619 caption='fullrmc not installed',style=wx.ICON_INFORMATION) 4611 4620 if G2frame.FRMC.GetSizer(): 4612 4621 G2frame.FRMC.GetSizer().Clear(True) … … 4620 4629 mainSizer.Add((5,5),0,WACV) 4621 4630 if G2frame.RMCchoice == 'fullrmc': 4631 try: 4632 from fullrmc import Engine 4633 except ModuleNotFoundError: 4634 return 4635 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,True) 4636 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_LOADRMC,True) 4637 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SAVERMC,True) 4638 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,True) 4639 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,True) 4622 4640 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' fullrmc run.py file preparation:'),0,WACV) 4623 4641 # font1 = wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas') … … 4641 4659 for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i+1,lenA)] for i in range(lenA)]: 4642 4660 BVSpairs += pair 4643 4661 BVS = {pairs:[0.0,0.0,0.0,0.0] for pairs in BVSpairs} 4644 4662 files = {'Neutron real space data; G(r): ':['',0.05,'G(r)','RMC',], 4645 4663 'Neutron reciprocal space data; F(Q): ':['',0.05,'F(Q)','RMC',], … … 5383 5401 def OnViewRMC(event): 5384 5402 if G2frame.RMCchoice == 'fullrmc': 5385 print('view fullrmc results - TBD') 5403 try: 5404 from fullrmc import Engine 5405 except ModuleNotFoundError: 5406 wx.MessageBox(''' fullrmc is not correctly installed for use in GSAS-II 5407 Install it in your python according to the instructions in 5408 https://bachiraoun.github.io/fullrmc/index.html. ''', 5409 caption='fullrmc not installed',style=wx.ICON_INFORMATION) 5410 return 5411 DIR_PATH = os.path.dirname( os.path.realpath(__file__) ) 5412 engineFilePath = os.path.join(DIR_PATH, "engine.rmc") 5413 5414 # load 5415 ENGINE = Engine(path=None) 5416 result, mes = ENGINE.is_engine(engineFilePath, mes=True) 5417 if result: 5418 ENGINE = ENGINE.load(engineFilePath) 5419 GR, SQ, CN, MD = ENGINE.constraints 5386 5420 else: 5387 5421 generalData = data['General']
Note: See TracChangeset
for help on using the changeset viewer.