python_code
stringlengths
0
992k
repo_name
stringlengths
8
46
file_path
stringlengths
5
162
#!/usr/bin/python # Copyright 2005, 2007 Nanorex, Inc. See LICENSE file for details. """Nanotube generation tool for nanoENGINEER-1 Usage: nanotube.py <n> <m> <length> where (n,m) is the chirality of the nanotube, and the length is in nanometers. The resulting MMP file is written to standard output. According to...
NanoCAD-master
cad/tests/nanotube.py
# Copyright 2005, 2007 Nanorex, Inc. See LICENSE file for details. import unittest import chem import assembly from qt import QApplication, SIGNAL import Utility import os ######################### import undo undo._use_hcmi_hack = False ######################### import MWsemantics import startup_funcs STILL_NEED...
NanoCAD-master
cad/tests/filetest.py
import unittest from VQT import angleBetween from Numeric import array, alltrue class GeometryFunctionsTestCase(unittest.TestCase): """Unit tests for the geometry functions defined in VQT.py""" def setUp(self): """Sets up any objects needed by this test case.""" pass def tearDown(self)...
NanoCAD-master
cad/tests/VQT_Test.py
# Copyright 2005, 2007 Nanorex, Inc. See LICENSE file for details. import unittest import chem import assembly import Utility import debug from elements import PeriodicTable Hydrogen = PeriodicTable.getElement(1) Carbon = PeriodicTable.getElement(6) Nitrogen = PeriodicTable.getElement(7) Oxygen = PeriodicTable.getEle...
NanoCAD-master
cad/tests/chemtest.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ splitting_a_mode.py -- explanation/demo of how to split an old mode, while maintaining temporary compatibility with non-split methods and subclass modes. @author: Bruce @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. This ...
NanoCAD-master
cad/doc/splitting_a_mode.py
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ _import_roots.py - import all toplevel files in the import dependency hierarchy @author: Bruce @version: $Id$ @copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details. Note: most of the files we import here are for separate main programs,...
NanoCAD-master
cad/src/_import_roots.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ NE1_Build_Constants.py is intended to be a very small file which consists of only the data that is likely to change for any given release, including anything which might be changed (manually or automatically) during the process of building a release itse...
NanoCAD-master
cad/src/NE1_Build_Constants.py
#!/usr/bin/env python # Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ ExecSubDir.py This is an odd little utility that might appear to do absolutely nothing. All it does is call execfile() on its first argument. It puts more effort into validating that it has an argument than what it does to that ...
NanoCAD-master
cad/src/ExecSubDir.py
#! /usr/bin/python # Copyright 2004-2007 Nanorex, Inc. See LICENSE file for details. """ main.py -- the initial startup file for NanoEngineer-1, treated specially by the release-building process. $Id$ This file should not be imported as the "main" module -- doing so prints a warning [as of 050902] and doesn't run th...
NanoCAD-master
cad/src/main.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ElementChooser.py @author: Mark Sims @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-08-03: Created. """ from PM.PM_MolecularModelingKit import PM_MolecularModelingKit from PyQt4.Qt import SIGNAL, ...
NanoCAD-master
cad/src/PM/PM_ElementChooser.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ComboBox.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrComboBox out of PropMgrBaseClass.py into this file and renamed it PM_ComboBox. """ from PyQt4.Qt import...
NanoCAD-master
cad/src/PM/PM_ComboBox.py
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details. """ PM_DoubleSpinBox.py @author: Mark @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrDoubleSpinBox out of PropMgrBaseClass.py into this file and renamed it PM_DoubleSpinBox. """ from P...
NanoCAD-master
cad/src/PM/PM_DoubleSpinBox.py
#Copyright 2004-2007 Nanorex, Inc. See LICENSE file for details. """ PM_TreeView.py The PM_TreeView class provides a partlib object (as a 'treeview' of any user specified directory) to the client code. The parts from the partlib can be pasted in the 3D Workspace. @author: Bruce, Huaicai, Mark, Ninad @version: $Id$ ...
NanoCAD-master
cad/src/PM/PM_TreeView.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ @author: Ninad @copyright: 2008 Nanorex, Inc. See LICENSE file for details. @version:$Id$ History: TODO - remove all self.command calls. """ from PM.PM_SelectionListWidget import PM_SelectionListWidget from utilities.constants import lightred_1, ligh...
NanoCAD-master
cad/src/PM/PM_ObjectChooser.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_SpinBox.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrSpinBox out of PropMgrBaseClass.py into this file and renamed it PM_SpinBox. """ from PyQt4.Qt import QLa...
NanoCAD-master
cad/src/PM/PM_SpinBox.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ PM_Dial.py @author: Mark @version: $Id$ @copyright: 2008 Nanorex, Inc. All rights reserved. History: piotr 2008-07-29: Created this file. """ from PyQt4.Qt import QDial from PyQt4.Qt import QLabel from PyQt4.Qt import QWidget from widgets.prefs_wi...
NanoCAD-master
cad/src/PM/PM_Dial.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_PreviewGroupBox.py The PM_PreviewGroupBox widget provides a preview pane for previewing elements , clipboard items , library parts etc. from the element chooser or list provided in the property manager. (The object being previewed can then be deposit...
NanoCAD-master
cad/src/PM/PM_PreviewGroupBox.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_LineEdit.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrLineEdit out of PropMgrBaseClass.py into this file and renamed it PM_LineEdit. """ from PyQt4.Qt import ...
NanoCAD-master
cad/src/PM/PM_LineEdit.py
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details. """ PM_Dialog.py @author: Mark @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrBaseClass out of PropMgrBaseClass.py into this file and renamed it PM_Dialog. """ import foundation.env a...
NanoCAD-master
cad/src/PM/PM_Dialog.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_LabelGrid.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-14: Created. """ from PyQt4.Qt import QFont from PM.PM_WidgetGrid import PM_WidgetGrid class PM_LabelGrid( PM_Widget...
NanoCAD-master
cad/src/PM/PM_LabelGrid.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_Utilities.py $Id$ """ from PyQt4.QtGui import QSizePolicy # Special Qt debugging functions written by Mark. 2007-05-24 ############ def getSizePolicyName(sizepolicy): """Returns the formal name of <sizepolicy>, a QSizePolicy. FYI: ...
NanoCAD-master
cad/src/PM/PM_Utilities.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_Clipboard.py The PM_Clipboard class provides a groupbox containing a list of clipboard items that can be pasted in the 3D Workspace. The selected item in this list is shown by its elementViewer (an instance of L{PM_PreviewGroupBox}) The object being ...
NanoCAD-master
cad/src/PM/PM_Clipboard.py
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details. """ PM_FontComboBox.py @author: Derrick @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. """ from PyQt4.Qt import QFontComboBox from PyQt4.Qt import QLabel from PyQt4.Qt import QWidget class PM_FontComboBox( QFontComboBox ):...
NanoCAD-master
cad/src/PM/PM_FontComboBox.py
""" The Property Manager (PM) module provides classes for creating NE1 property manager dialogs. The main class in the PM module is L{PM_Dialog}, which is a base class. It can contain one or more group boxes (L{PM_GroupBox}) that can contain one or more PM widgets. IMAGE(http://www.nanoengineer-1.net/mediawiki/images...
NanoCAD-master
cad/src/PM/__init__.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_StackedWidget.py @author: Mark @version: $Id$ @copyright: 2008 Nanorex, Inc. All rights reserved. History: Mark 2008-05-07: Written for L{DnaDisplayStyle_PropertyManager} to deal with the UI requirements imposed by adding all the DNA display ...
NanoCAD-master
cad/src/PM/PM_StackedWidget.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ PM_TableWidget.py Simple wrapper over Qt QtableWidget class. @author: Piotr @version: $Id$ @copyright: 2008 Nanorex, Inc. All rights reserved. History: piotr 2008-07-15: Created this file. """ from PyQt4.Qt import Qt from PyQt4.Qt import QTableWid...
NanoCAD-master
cad/src/PM/PM_TableWidget.py
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ PM_DockWidget.py @author: Ninad @copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details. @version:$Id$ History: Ninad 2007-11-20: Created to implement DnaSequenceEditor TODO: - Add more documentation NOTE: methods addPmWidget and getPmW...
NanoCAD-master
cad/src/PM/PM_DockWidget.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_MessageGroupBox.py The PM_MessageGroupBox widget provides a message group box with a collapse/expand button and a title. @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split Pr...
NanoCAD-master
cad/src/PM/PM_MessageGroupBox.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ToolButtonGrid.py @author: Mark Sims @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-08-02: Created. ninad 2007-08-14: New superclass PM_WidgetGrid. Related refactoring and cleanup. """ import sys ...
NanoCAD-master
cad/src/PM/PM_ToolButtonGrid.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_WidgetsDemoPropertyManager.py - Displays all the PM module widgets in a PM. $Id$ """ from PyQt4.Qt import Qt, SIGNAL from PM.PM_Dialog import PM_Dialog from PM.PM_GroupBox import PM_GroupBox from PM.PM_CheckBox import PM_Che...
NanoCAD-master
cad/src/PM/PM_WidgetsDemoPropertyManager.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_ToolButtonRow.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-07: Created. ninad 2007-08-14: Changes due to the new superclass of PM_ToolButtonGrid. """ from PM.PM_ToolButtonGri...
NanoCAD-master
cad/src/PM/PM_ToolButtonRow.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ This class provides a table widget to display search results for a DnaStrand or DnaSegment. It displays node name in one column and number of nucleotides in the other. @author: Ninad @copyright: 2008 Nanorex, Inc. See LICENSE file for details. @version...
NanoCAD-master
cad/src/PM/PM_DnaSearchResultTable.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_TextEdit.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrTextEdit out of PropMgrBaseClass.py into this file and renamed it PM_TextEdit. """ from PM.PM_Constants ...
NanoCAD-master
cad/src/PM/PM_TextEdit.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ GroupButtonMixin.py $Id$ History and status: Written by Will in GeneratorBaseClass.py, but no longer used there or by anything that uses it. bruce 070619 moved this from GeneratorBaseClass.py to its own file. It is deprecated; its uses should be...
NanoCAD-master
cad/src/PM/GroupButtonMixin.py
#Copyright 2004-2008 Nanorex, Inc. See LICENSE file for details. """ PM_PartLib.py The PM_PartLib class provides a groupbox that contains the partlib (any user specified directory). The parts from the partlib can be pasted into the 3D workspace. The selected item in this list is shown by its elementViewer (an instanc...
NanoCAD-master
cad/src/PM/PM_PartLib.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_Colors.py -- Property Manager color theme functions and constants.. @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Created initially for PM_Dialog as part of the code cleanup ...
NanoCAD-master
cad/src/PM/PM_Colors.py
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ PM_PAM3_AtomChooser.py @author: Ninad @version: $Id$ @copyright: 2007-2008 Nanorex, Inc. All rights reserved. """ from PM.PM_MolecularModelingKit import PM_MolecularModelingKit from utilities.constants import diBALL from utilities.GlobalPreferenc...
NanoCAD-master
cad/src/PM/PM_PAM3_AtomChooser.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_CoordinateSpinBoxes.py The PM_CoordinateSpinBoxes class provides a groupbox containing the three coordinate spinboxes. @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. @TODO: Need to implement connectWidge...
NanoCAD-master
cad/src/PM/PM_CoordinateSpinBoxes.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ToolButton.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrToolButton out of PropMgrBaseClass.py into this file and renamed it PM_ToolButton. """ import os from ...
NanoCAD-master
cad/src/PM/PM_ToolButton.py
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ PM_PAM5_AtomChooser.py @author: Ninad @version: $Id$ @copyright: 2007-2008 Nanorex, Inc. All rights reserved. """ from PM.PM_MolecularModelingKit import PM_MolecularModelingKit from utilities.constants import diBALL from utilities.GlobalPreferenc...
NanoCAD-master
cad/src/PM/PM_PAM5_AtomChooser.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_LabelRow.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-14: Created. """ from PM.PM_LabelGrid import PM_LabelGrid class PM_LabelRow( PM_LabelGrid ): """ The PM_LabelRo...
NanoCAD-master
cad/src/PM/PM_LabelRow.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ColorComboBox.py @author: Mark @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. To do: - Override addItem() and insertItem() methods. """ from PM.PM_ComboBox import PM_ComboBox from PyQt4.Qt import QPixmap, QIcon, QCo...
NanoCAD-master
cad/src/PM/PM_ColorComboBox.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_GroupBox.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrGroupBox out of PropMgrBaseClass.py into this file and renamed it PM_GroupBox. """ import sys from utili...
NanoCAD-master
cad/src/PM/PM_GroupBox.py
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details. """ PM_MolecularModelingKit.py - Atom Chooser widget @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. """ from model.elements import PeriodicTable from PyQt4.Qt import SIGNAL from PM.PM_GroupBox import PM_GroupBox from PM.PM_...
NanoCAD-master
cad/src/PM/PM_MolecularModelingKit.py
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details. """ PM_ColorChooser.py @author: Mark @version: $Id$ @copyright: 2006-2009 Nanorex, Inc. All rights reserved. History: """ from PyQt4.Qt import QLabel from PyQt4.Qt import QFrame from PyQt4.Qt import QToolButton from PyQt4.Qt import QHBoxLayout from...
NanoCAD-master
cad/src/PM/PM_ColorChooser.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ PM_PrefsCheckBoxes.py PM_PrefsCheckBoxes class provides a way to insert a groupbox within a Property Manager, that contains a bunch of check boxes connected to the User Preference via preference keys. @author: Ninad @copyright: 2008 Nanorex, Inc. See...
NanoCAD-master
cad/src/PM/PM_PrefsCheckBoxes.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_RadioButton.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrRadioButton out of PropMgrBaseClass.py into this file and renamed it PM_RadioButton. """ from PyQt4.Q...
NanoCAD-master
cad/src/PM/PM_RadioButton.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_Constants.py -- Property Manager constants. @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Created initially for PM_Dialog as part of the code cleanup and revie...
NanoCAD-master
cad/src/PM/PM_Constants.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_WidgetGrid.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-14: Created. """ from PyQt4.Qt import QSizePolicy from PyQt4.Qt import QSpacerItem from PyQt4.Qt import QSize from Py...
NanoCAD-master
cad/src/PM/PM_WidgetGrid.py
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ PM_SelectionListWidget.py @author: Ninad @version: $Id$ @copyright: 2007-2008 Nanorex, Inc. All rights reserved. TODO: - Probably need to revise the tag instructions. At the moment it is confusing. If a list widget item is selected from that wi...
NanoCAD-master
cad/src/PM/PM_SelectionListWidget.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_ListWidget.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrListWidget out of PropMgrBaseClass.py into this file and renamed it PM_ListWidget. """ from PyQt4.Qt i...
NanoCAD-master
cad/src/PM/PM_ListWidget.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_PushButton.py @author: Mark @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrPushButton out of PropMgrBaseClass.py into this file and renamed it PM_PushButton. """ from PyQt4.Qt i...
NanoCAD-master
cad/src/PM/PM_PushButton.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_Slider.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-21: Created. """ from PyQt4.Qt import Qt from PyQt4.Qt import QSlider from PyQt4.Qt import QLabel from PyQt4.Qt import QWi...
NanoCAD-master
cad/src/PM/PM_Slider.py
# Copyright 2008 Nanorex, Inc. See LICENSE file for details. """ @author: Ninad @copyright: 2008 Nanorex, Inc. See LICENSE file for details. @version:$Id$ History: 2008-08-12 created. TODO 2008-08-12: - This uses global pref keys (hardcoded) because the preference is supposed to remain in all commands. Other optio...
NanoCAD-master
cad/src/PM/PM_DnaBaseNumberLabelsGroupBox.py
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details. """ PM_CheckBox.py @author: Mark @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. History: mark 2007-07-22: Split PropMgrCheckBox out of PropMgrBaseClass.py into this file and renamed it PM_CheckBox. """ from PyQt4.Qt import...
NanoCAD-master
cad/src/PM/PM_CheckBox.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_RadioButtonList.py @author: Mark Sims @version: $Id$ @copyright: 2006-2007 Nanorex, Inc. All rights reserved. History: mark 2007-08-05: Created. """ from PyQt4.Qt import QButtonGroup from PyQt4.Qt import QRadioButton from PM.PM_GroupBox imp...
NanoCAD-master
cad/src/PM/PM_RadioButtonList.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ PM_FileChooser.py @author: Mark @version: $Id$ @copyright: 2006-2008 Nanorex, Inc. All rights reserved. History: """ import os from PyQt4.Qt import QLabel from PyQt4.Qt import QLineEdit from PyQt4.Qt import QToolButton from PyQt4.Qt import QHBo...
NanoCAD-master
cad/src/PM/PM_FileChooser.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ PM_WidgetRow.py @author: Ninad @version: $Id$ @copyright: 2007 Nanorex, Inc. See LICENSE file for details. History: ninad 2007-08-09: Created. @attention: This file is subject to heavy modifications. """ from PM.PM_WidgetGrid import PM_WidgetGrid f...
NanoCAD-master
cad/src/PM/PM_WidgetRow.py
# Copyright 2005-2007 Nanorex, Inc. See LICENSE file for details. """ bond_updater.py Recompute structural bond orders when necessary. @author: Bruce @version: $Id$ @copyright: 2005-2007 Nanorex, Inc. See LICENSE file for details. This is needed for bonds between atoms whose atomtypes make p orbitals available for...
NanoCAD-master
cad/src/model_updater/bond_updater.py
# Copyright 2005-2008 Nanorex, Inc. See LICENSE file for details. """ master_model_updater.py - do the post-event (or pre-checkpoint) updates necessary for all of NE1's model types, in an appropriate order (which may involve recursively running some lower-level updates to completion after higher-level ones change thin...
NanoCAD-master
cad/src/model_updater/master_model_updater.py
NanoCAD-master
cad/src/model_updater/__init__.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """This addresses bug 1167, where if the BROWSER environment variable is not set, nE-1 may not be able to find the web browser to do wiki help. Let's see if we can resolve that issue without putting \"export BROWSER\" in the .bashrc o...
NanoCAD-master
cad/src/experimental/browserHack.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'PreferencesDialog.ui' # # Created: Wed Aug 27 16:00:53 2008 # by: PyQt4 UI code generator 4.3.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_PreferencesDialog(object): def setup...
NanoCAD-master
cad/src/experimental/prefs/Ui_PreferencesDialog.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ WhatsThisText_for_PreferencesDialog.py This file provides functions for setting the "What's This" and tooltip text for widgets in the NE1 Preferences dialog only. Edit WhatsThisText_for_MainWindow.py to set "What's This" and tooltip text for widgets in...
NanoCAD-master
cad/src/experimental/prefs/WhatsThisText_for_PreferencesDialog.py
# Copyright 2005-2008 Nanorex, Inc. See LICENSE file for details. """ Preferences.py @author: Mark @version: $Id: Preferences.py 14197 2008-09-11 04:52:29Z brucesmith $ @copyright: 2005-2008 Nanorex, Inc. See LICENSE file for details. History: -Mark 2008-05-20: Created by Mark from a copy of UserPrefs.py """ impor...
NanoCAD-master
cad/src/experimental/prefs/Preferences.py
# Copyright 2004-2008 Nanorex, Inc. See LICENSE file for details. """ PreferencesDialog.py This is experimental. To run, type: python PreferencesDialog.py """ import sys, os from PyQt4.Qt import * from PyQt4 import QtCore, QtGui from Ui_PreferencesDialog import Ui_PreferencesDialog # imports for testing from PM.P...
NanoCAD-master
cad/src/experimental/prefs/PreferencesDialog.py
# Copyright 2005-2007 Nanorex, Inc. See LICENSE file for details. """ extensions.py Note: for now, this is intentionally not imported (even indirectly or conditionally) by main.py; see comment below for why. But it should remain in this directory. [bruce 071005]. Someday: handle all our custom extension modules. Fo...
NanoCAD-master
cad/src/experimental/pyrex_test/extensions.py
# Copyright 2005-2007 Nanorex, Inc. See LICENSE file for details. """ setup.py Distutils setup file -- tells distutils how to rebuild our custom extension modules. $Id$ This file is NOT meant to be imported directly by nE-1. One way to run it might be "make extensions"; see Makefile in this directory. A more direc...
NanoCAD-master
cad/src/experimental/pyrex_test/setup.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ NE1 simulation-related API. """
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_Simulation/__init__.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ Encapsulates all the particulars of a simulation. The L{SimSpecification} class is essentially a hierarchical parameter set that describes a cross-package compatible simulation specification. All reusable configuration is captured here including mo...
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_Simulation/SimSpecification.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ Encapsulates the information necessary for viewing and editing single parameters via some GUI. The following is the object model of the Parameter module: IMAGE_2 """ class Parameter: """ A GUI editable key/value pair. When newly construc...
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_Simulation/Parameter.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ Adjusts the positions of the given atoms so as to minimize the structure's total energy. """ from NE1_Simulation.Parameter import Parameter class EnergyMinimizer: """ Adjusts the positions of the given atoms so as to minimize the structu...
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_CorePlugins/EnergyMinimizer.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ Plugin APIs that interface directly with the NE1 core. """
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_CorePlugins/__init__.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ NE1 core-library-related API. """
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_Lib/__init__.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ NE1 core-library-related API. """ class NE1_Lib: """ Core NE1 methods (to support the NH1 wizard.) This API is just to give an idea - still needs to be thought through. The premise of the getXxxUI() methods is that NE1 shall prov...
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_Lib/NE1_Lib.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ A job that the NE1 Job Manager schedules and monitors. """ class NE1_Job: """ A job that the NE1 Job Manager schedules and monitors. Subclasses know how to run themselves and can be polled. This is an abstract/interface class and...
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_JobManagement/NE1_Job.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ NE1 job-management-related API. """
NanoCAD-master
cad/src/experimental/NH1_Integration/lib/NE1_JobManagement/__init__.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ Encapsulates a simulation results data store. The main class in this module is L{SimResultsDataStore}. The L{SimResultsBond} class is really just a container for bond information. """ class SimResultsBond: """ A chemical bond. See L{SimResults...
NanoCAD-master
cad/src/experimental/NH1_Integration/HDF5_SimResults/lib/NE1_Simulation/SimResultsDataStore.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ NE1 simulation-related API. """
NanoCAD-master
cad/src/experimental/NH1_Integration/HDF5_SimResults/lib/NE1_Simulation/__init__.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import os, sys seq = 'gattaca' n = len(seq) strands = 2 # NAMOT seems broken for one strand? Am I using it wrong? ######################################################### # # We will need to ask Paul R to help us understand these distortions. # I can...
NanoCAD-master
cad/src/experimental/namot/hack.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import sys import distutils.sysconfig import distutils.ccompiler class FakeCompiler: def __init__(self): self.compiler_type = distutils.ccompiler.get_default_compiler() def set_executables(self, **kw): for k in kw: setattr(self,...
NanoCAD-master
cad/src/experimental/pyrex-example/distutils_compile_options.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = "Will" import sys, os, Pyrex def find_pyrexc(): if sys.platform == 'darwin': x = os.path.dirname(Pyrex.__file__).split('/') return '/'.join(x[:-4] + ['bin', 'pyrexc']) elif sys.platform == 'linux2': if os....
NanoCAD-master
cad/src/experimental/pyrex-example/findpyrex.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = 'oleksandr' from Interval import * from Triple import * """box representation""" class Box: def __init__(self, *args): """box constructor""" self.x = Interval() self.y = Interval() self.z = Interval(...
NanoCAD-master
cad/src/experimental/oleksandr/Box.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = 'oleksandr' """interval representation""" class Interval: def __init__(self, *args): """interval constructor""" self.min = 0 self.max = 0 if len(args) == 0: pass if len(args) == 2:...
NanoCAD-master
cad/src/experimental/oleksandr/Interval.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import sys import distutils.sysconfig import distutils.ccompiler class FakeCompiler: def __init__(self): self.compiler_type = distutils.ccompiler.get_default_compiler() def set_executables(self, **kw): for k in kw: setattr(self,...
NanoCAD-master
cad/src/experimental/oleksandr/distutils_compile_options.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = 'oleksandr' import types, operator, math """3D vector representation""" class Triple: def __init__(self, *args): """vector constructor""" self.x = 0 self.y = 0 self.z = 0 if len(args) == 0: ...
NanoCAD-master
cad/src/experimental/oleksandr/Triple.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = "Will" import sys, os, Pyrex def find_pyrexc(): if sys.platform == 'darwin': x = os.path.dirname(Pyrex.__file__).split('/') return '/'.join(x[:-4] + ['bin', 'pyrexc']) elif sys.platform == 'linux2': if os....
NanoCAD-master
cad/src/experimental/oleksandr/findpyrex.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """ >... anything I'm doing wrong? Not overriding QGLWidget's necessary methods that draw things, paintGL, resizeGL, maybe an init method. GLPane shows the way, so does the smaller ThumbView. But it's easier and more relevant to NE1...
NanoCAD-master
cad/src/experimental/LearningOpenGL/Cruft.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """Try to do all the OpenGL stuff in Python, on the theory that C extensions are hard to debug. """ import CruftDialog from qt import * from qtcanvas import * from qtgl import * from OpenGL.GL import * import Numeric import sys impor...
NanoCAD-master
cad/src/experimental/LearningOpenGL/Craft.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import sys import distutils.sysconfig import distutils.ccompiler class FakeCompiler: def __init__(self): self.compiler_type = distutils.ccompiler.get_default_compiler() def set_executables(self, **kw): for k in kw: setattr(self,...
NanoCAD-master
cad/src/experimental/LearningOpenGL/distutils_compile_options.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. from jelloGui import * import sys import random import time import types import string from math import cos, sin, sqrt PROFILING = True if PROFILING: import hotshot, hotshot.stats GOT_PYREX = False try: import comp GOT_P...
NanoCAD-master
cad/src/experimental/finite-element/jello.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import sys import distutils.sysconfig import distutils.ccompiler class FakeCompiler: def __init__(self): self.compiler_type = distutils.ccompiler.get_default_compiler() def set_executables(self, **kw): for k in kw: setattr(self,...
NanoCAD-master
cad/src/experimental/finite-element/distutils_compile_options.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. __author__ = "Will" import sys, os, Pyrex def find_pyrexc(): if sys.platform == 'darwin': x = os.path.dirname(Pyrex.__file__).split('/') return '/'.join(x[:-4] + ['bin', 'pyrexc']) elif sys.platform == 'linux2': if os....
NanoCAD-master
cad/src/experimental/finite-element/findpyrex.py
# Copyright 2007 Nanorex, Inc. See LICENSE file for details. """ units.py - physical units for calculations $Id$ When quantities are multiplied or divided, the powers of units are correctly maintained. If one unit ends up being raised to a zeroth power, that unit is discarded in the product or ratio. If there are no...
NanoCAD-master
cad/src/experimental/units/units.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """Convert CoNTub's PDB output to an MMP file Typical usage: python pdb2mmp.py < hetero.pdb > hetero.mmp """ import sys, string class Atom: def __init__(self, index, elem, xyz): self.index = index self.elem = elem self...
NanoCAD-master
cad/src/experimental/graphene/pdb2mmp.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import os, sys, string from math import * sys.path.append("/home/wware/polosims/cad/src") from geometry.VQT import A, V, vlen class AtomType: def __init__(self, symbol, number, rcovalent): self.symbol = symbol s...
NanoCAD-master
cad/src/experimental/bdna-bases/prepare.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """Arbitrary 2D surfaces in 3D space can be represented as: f(v) = 0 where f takes a 3D vector v and returns a scalar. For a sphere, where f(x,y,z) = x**2 + y**2 + z**2 - R**2. By convention, the points where f(v) < 0 are the i...
NanoCAD-master
cad/src/experimental/tiling/shapes.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. """Arbitrary 2D surfaces in 3D space can be represented as: f(v) = 0 where f takes a 3D vector v and returns a scalar. For a sphere, where f(x,y,z) = x**2 + y**2 + z**2 - R**2. We would like to take these arbitrary surfaces and...
NanoCAD-master
cad/src/experimental/tiling/foo.py
#!/usr/bin/python # Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. # Think about the set sizes for which this scheme is memory efficient. import time import unittest import Numeric stuff = None #stuff = [ ] N = 10**4 #N = 1000 ## Verifying Bruce's suspicion that the 9/9/9/5 scheme was a memory ## h...
NanoCAD-master
cad/src/experimental/pyrex-atoms-bonds/smallerFootprint.py
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details. import time import unittest import random import Numeric from bases import * N = int(10**6) #N = int(10**6) class PerformanceLog: def __init__(self): self.records = [ ] def __setitem__(self, name, time): self.records.append("%s...
NanoCAD-master
cad/src/experimental/pyrex-atoms-bonds/tryit.py