Esempio n. 1
0
 def __init__(self):
     self._active = True
     self._size = _Button._MultiStateVariable._create(.3)
     self._color = _Button._MultiStateVariable._create()
     self._color._idle = Color.White()
     self._color._highlighted = Color(whole_num=0x2fdbbfff)
     self._color._selected = Color(whole_num=0x00e5bfff)
     self._color._selected_highlighted = Color(whole_num=0x00f9d0ff)
     self._color._unusable = Color.Grey()
Esempio n. 2
0
def create_atom():
    val = struct.Atom()
    val.index = 1000
    val.selected = True
    val.atom_mode = 1  # BALLSTICK
    val.labeled = True
    val.atom_rendering = True
    val.atom_color = Color.White()
    val.surface_rendering = True
    val.surface_color = Color.White()
    val.surface_opacity = 1
    val.symbol = "Carbon"
    val.serial = 0
    val.name = "default"
    val.position = Vector3()
    return val
Esempio n. 3
0
 def __init__(self):
     super(_Image, self).__init__()
     self._file_path = ""
     self._color = Color.White()
     self._scaling_option = _Image.ScalingOptions.stretch
     self._pressed_callback = lambda self, x, y: None
     self._held_callback = lambda self, x, y: None
     self._released_callback = lambda self, x, y: None
Esempio n. 4
0
 def __init__(self):
     self._active = False
     self._value = _Button._MultiStateVariable._create("")
     self._color = _Button._MultiStateVariable._create(Color.White())
     self._sharpness = 0.5
     self._size = 1.0
     self._ratio = 0.5
     self._position = Vector3()
     self._rotation = Vector3()
Esempio n. 5
0
 def __init__(self):
     super(_Atom, self).__init__()
     #Molecular
     self._symbol = "C"
     self._serial = 1
     self._name = "default"
     self._is_het = False
     self._atom_type = "C"
     #No API
     self._occupancy = 0.0
     self._bfactor = 0.0
     self._acceptor = False
     self._donor = False
     self._formal_charge = 0
     #Rendering
     #API
     self._selected = False
     self._atom_mode = _Atom.AtomRenderingMode.BallStick
     self._labeled = False
     self._label_text = ""
     self._atom_rendering = True
     self._atom_color = Color.Clear()
     self._atom_scale = 0.5
     self._surface_rendering = False
     self._surface_color = Color.Clear()
     self._surface_opacity = 1.0
     #No API
     self._hydrogened = True
     self._watered = True
     self._het_atomed = True
     self._het_surfaced = True
     #conformer
     self._positions = [Vector3()]
     self._in_conformer = [True]
     #internal
     self._unique_identifier = _Atom._atom_count
     self._bonds = []
     self._parent = None
     _Atom._atom_count += 1
Esempio n. 6
0
def create_residue():
    val = struct.Residue()
    val.index = 1000
    val._atoms = [struct.Atom(), create_atom(), struct.Atom(), create_atom()]
    val._bonds = [create_bond(), create_bond(), create_bond(), create_bond()]
    val.ribboned = True
    val.ribbon_size = 1
    val.ribbon_mode = struct.Residue.RibbonMode.Coil 
    val.ribbon_color = Color.White() 
    val.type = "asdf" #RESIDUEDATA
    val.serial = 1
    val.name = "asdf1234"
    val.secondary_structure = struct.Residue.SecondaryStructure.Sheet
    return val
Esempio n. 7
0
 def __init__(self):
     self._active = True
     self._value = _Button._MultiStateVariable._create("text")
     self._auto_size = True
     self._min_size = 0.0
     self._max_size = .3
     self._size = 0.2
     self._underlined = False
     self._ellipsis = True
     self._bold = _Button._MultiStateVariable._create(True)
     self._color = _Button._MultiStateVariable._create(Color.White())
     self._padding_top = 0
     self._padding_bottom = 0
     self._padding_left = 0
     self._padding_right = 0
     self._line_spacing = 0
     self._vertical_align = _Button.VertAlignOptions.Middle
     self._horizontal_align = _Button.HorizAlignOptions.Middle
Esempio n. 8
0
 def __init__(self):
     super(_Residue, self).__init__()
     #molecular
     self._type = "ARG"  #RESIDUEDATA
     self._serial = 1
     self._name = "res"
     self._secondary_structure = _Residue.SecondaryStructure.Unknown
     #rendering
     self._ribboned = True
     self._ribbon_size = 1.0
     self._ribbon_mode = _Residue.RibbonMode.SecondaryStructure
     self._ribbon_color = Color.Clear()
     self._labeled = False
     self._label_text = ""
     #connections
     self._atoms = []
     self._bonds = []
     self._parent = None
Esempio n. 9
0
 def __init__(self):
     self._color = Color()
     self._rmsd = 0.0
Esempio n. 10
0
def rand_color():
    return Color(whole_num = rand_int())
Esempio n. 11
0
 def __init__(self):
     self._active = False
     self._enabled = _Button._MultiStateVariable._create(True)
     self._color = _Button._MultiStateVariable._create(Color.Black())
Esempio n. 12
0
 def deserialize(self, version, context):
     return Color.from_int(context.read_uint())
Esempio n. 13
0
import nanome
from nanome.util import Logs
from nanome.util import Color

import os

SELECTED_COLOR = Color.from_int(0x00ecc4ff)
DESELECTED_COLOR = Color.from_int(0xffffffff)
CHECKICON = "GreenCheck.png"
LOCKICON = "Lock.png"
UNLOCKICON = "Unlock.png"
REFRESHICON = "Refresh.png"
QUESTIONMARKICON = "QuestionMark.png"


class RMSDMenu():
    def __init__(self, rmsd_plugin):
        self._menu = rmsd_plugin.menu
        self._plugin = rmsd_plugin
        self._selected_mobile = []  # button
        self._selected_target = None  # button
        self._run_button = None
        self._current_tab = "receptor"  # receptor = 0, target = 1
        self._drop_down_dict = {
            "rotation": ["None", "Kabsch", "Quaternion"],
            "reorder_method": ["None", "Hungarian", "Brute", "Distance"],
            "select": ["None", "Global"]
        }  # select["Local"] in the future
        self._current_reorder = "None"
        self._current_rotation = "None"
        self._current_select = "None"
Esempio n. 14
0
 def __init__(self):
     super(_Mesh, self).__init__()
     self._mesh_color = Color.Gray()