Changeset 1940
- Timestamp:
- Jul 21, 2015 10:44:07 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r1939 r1940 1566 1566 continue 1567 1567 nH = 1 #for O atom 1568 if 'C' in neigh[0] or 'N' in neigh[0]:1568 if atom[ct] in ['C','N']: 1569 1569 nH = 4-len(neigh[1][0]) 1570 1570 bonds = {item[0]:item[1:] for item in neigh[1][0]} … … 1573 1573 nextName = bonds.keys()[0] 1574 1574 for bond in bonds: 1575 if 'C' in neigh[0]:1575 if 'C' in atom[ct]: 1576 1576 if 'C' in bond and bonds[bond][0] < 1.42: 1577 1577 nH -= 1 … … 1580 1580 nH -= 1 1581 1581 break 1582 elif 'O' in neigh[0] and 'C' in bonds and bonds[bond][0] < 1.3:1582 elif 'O' in atom[ct] and 'C' in bonds and bonds[bond][0] < 1.3: 1583 1583 nH -= 1 1584 1584 break … … 1734 1734 def AtomDelete(event): 1735 1735 colLabels = [Atoms.GetColLabelValue(c) for c in range(Atoms.GetNumberCols())] 1736 HydIds = data['General']['HydIds'] 1736 1737 ci = colLabels.index('I/A') 1737 1738 indx = Atoms.GetSelectedRows() … … 1745 1746 G2frame.dataFrame.SetStatusText('**** ERROR - atom is in a rigid body and can not be deleted ****') 1746 1747 else: 1748 if atom[ci+8] in HydIds: #remove Hs from Hatom update dict 1749 del HydIds[atom[ci+8]] 1747 1750 IDs.append(atom[ci+8]) 1748 1751 del atomData[ind] … … 1755 1758 G2plt.PlotStructure(G2frame,data) 1756 1759 SetupGeneral() 1760 if not len(HydIds): 1761 G2frame.dataFrame.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,False) 1757 1762 event.StopPropagation() 1758 1763
Note: See TracChangeset
for help on using the changeset viewer.