"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/components/molecule.py" between
relax-4.1.3.src.tar.bz2 and relax-5.0.0.src.tar.bz2

About: relax allows the study of molecular dynamics through the analysis of experimental NMR data. Organic molecules, proteins, RNA, DNA, sugars, and other biomolecules are all supported.

molecule.py  (relax-4.1.3.src.tar.bz2):molecule.py  (relax-5.0.0.src.tar.bz2)
############################################################################### ###############################################################################
# # # #
# Copyright (C) 2009-2010 Michael Bieri # # Copyright (C) 2009-2010 Michael Bieri #
# Copyright (C) 2009-2012,2014 Edward d'Auvergne # # Copyright (C) 2009-2012,2014,2019 Edward d'Auvergne #
# # # #
# This file is part of the program relax (http://www.nmr-relax.com). # # This file is part of the program relax (http://www.nmr-relax.com). #
# # # #
# This program is free software: you can redistribute it and/or modify # # This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or # # the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. # # (at your option) any later version. #
# # # #
# This program is distributed in the hope that it will be useful, # # This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # but WITHOUT ANY WARRANTY; without even the implied warranty of #
skipping to change at line 31 skipping to change at line 31
############################################################################### ###############################################################################
# Module docstring. # Module docstring.
"""Module containing the classes for GUI components involving molecules.""" """Module containing the classes for GUI components involving molecules."""
# Python module imports. # Python module imports.
import wx import wx
import wx.lib.buttons import wx.lib.buttons
# relax module imports. # relax module imports.
import dep_check
from graphics import fetch_icon from graphics import fetch_icon
from gui.components.base_list import Base_list from gui.components.base_list import Base_list
from gui.string_conv import gui_to_str, str_to_gui from gui.string_conv import gui_to_str, str_to_gui
from gui.uf_objects import Uf_storage; uf_store = Uf_storage() from gui.uf_objects import Uf_storage; uf_store = Uf_storage()
from pipe_control.mol_res_spin import molecule_loop, return_molecule from pipe_control.mol_res_spin import molecule_loop, return_molecule
from status import Status; status = Status() from status import Status; status = Status()
from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.data import Uf_info; uf_info = Uf_info()
# Some IDs for the menu entries. # Some IDs for the menu entries.
MENU_MOLECULE_NAME = wx.NewId() MENU_MOLECULE_NAME = wx.NewId()
skipping to change at line 189 skipping to change at line 190
} }
] ]
def update_data(self): def update_data(self):
"""Method called from self.build_element_safe() to update the list data. """ """Method called from self.build_element_safe() to update the list data. """
# Expand the number of rows to match the number of molecules, and add th e data. # Expand the number of rows to match the number of molecules, and add th e data.
i = 0 i = 0
for mol, mol_id in molecule_loop(return_id=True): for mol, mol_id in molecule_loop(return_id=True):
# Set the index. # Set the index.
self.element.InsertStringItem(i, str_to_gui(mol_id)) if dep_check.wx_classic:
self.element.InsertStringItem(i, str_to_gui(mol_id))
else:
self.element.InsertItem(i, str_to_gui(mol_id))
# Set the molecule name. # Set the molecule name.
if mol.name != None: if mol.name != None:
self.element.SetStringItem(i, 1, str_to_gui(mol.name)) if dep_check.wx_classic:
self.element.SetStringItem(i, 1, str_to_gui(mol.name))
else:
self.element.SetItem(i, 1, str_to_gui(mol.name))
# Set the molecule type. # Set the molecule type.
if hasattr(mol, 'type'): if hasattr(mol, 'type'):
self.element.SetStringItem(i, 2, str_to_gui(mol.type)) if dep_check.wx_classic:
self.element.SetStringItem(i, 2, str_to_gui(mol.type))
else:
self.element.SetItem(i, 2, str_to_gui(mol.type))
# Set the thiol state. # Set the thiol state.
if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'thiol_state') : if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'thiol_state') :
self.element.SetStringItem(i, 3, str_to_gui(cdp.exp_info.thiol_s if dep_check.wx_classic:
tate)) self.element.SetStringItem(i, 3, str_to_gui(cdp.exp_info.thi
ol_state))
else:
self.element.SetItem(i, 3, str_to_gui(cdp.exp_info.thiol_sta
te))
# Increment the counter. # Increment the counter.
i += 1 i += 1
 End of changes. 6 change blocks. 
6 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)