Пример #1
0
    def __init__(self):
        ok, nd1_plugin_path = find_plugin_dir("NanoDynamics-1")
        if (not ok):
            env.history.redmsg("Error: can't find " + nd1_plugin_path)
            nd1_plugin_path = "."
        fileName = os.path.join(nd1_plugin_path, "sim-params.txt")

        self._parameterValues = {}
        try:
            print "sim parameters used by NE1 read from: [%s]" % fileName
            parametersFile = open(fileName)
            for line in parametersFile:
                s = line.split()
                if (len(s) > 0 and s[0] == "ne1"):
                    if (len(s) > 1):
                        key = s[1]
                        if (len(s) > 2):
                            value = " ".join(s[2:])
                        else:
                            value = True
                        self._parameterValues[key] = value
        except IOError:
            msg = "Error reading [%s]" % fileName
            print_compact_traceback(msg + ": ")
            env.history.redmsg(msg)
            self._parameterValues = {}
Пример #2
0
 def find_plugin_dir(self):
     ok, path = find_plugin_dir(self.plugin_name)
     if ok:
         assert os.path.isdir(path)
         return path
     else:
         errortext = path
         self.fatal( errortext)
         return None
     pass
Пример #3
0
    def __init__(self):
        global _thePyrexSimulator
        assert (_thePyrexSimulator is None)
        _thePyrexSimulator = self
        import sim # this import must not be done at toplevel
        self.sim = sim.theSimulator()

        ok, nd1_plugin_path = find_plugin_dir("NanoDynamics-1")
        if (not ok):
            env.history.redmsg("Error: can't find " + nd1_plugin_path)
            nd1_plugin_path = "."
        self.system_parameters_file = os.path.join(nd1_plugin_path, "sim-params.txt")
Пример #4
0
    def __init__(self):
        global _thePyrexSimulator
        assert _thePyrexSimulator is None
        _thePyrexSimulator = self
        import sim  # this import must not be done at toplevel

        self.sim = sim.theSimulator()

        ok, nd1_plugin_path = find_plugin_dir("NanoDynamics-1")
        if not ok:
            env.history.redmsg("Error: can't find " + nd1_plugin_path)
            nd1_plugin_path = "."
        self.system_parameters_file = os.path.join(nd1_plugin_path, "sim-params.txt")
        self.amber_bonded_parameters_file = os.path.join(nd1_plugin_path, "ffamber03bon.itp")
        self.amber_nonbonded_parameters_file = os.path.join(nd1_plugin_path, "ffamber03nb.itp")
        self.amber_charges_file = os.path.join(nd1_plugin_path, "ffamber03charge.itp")
from dna.model.Dna_Constants import getDuplexBasesPerTurn

##from dna.updater.dna_updater_prefs import pref_dna_updater_convert_to_PAM3plus5

from simulation.sim_commandruns import adjustSinglet
from model.elements import PeriodicTable
from model.Line import Line

from model.chem import Atom_prekill_prep
Element_Ae3 = PeriodicTable.getElement('Ae3')

from dna.model.Dna_Constants import basesDict, dnaDict
from dna.model.dna_model_constants import LADDER_END0

basepath_ok, basepath = find_plugin_dir("DNA")
if not basepath_ok:
    env.history.message(orangemsg("The cad/plugins/DNA directory is missing."))

RIGHT_HANDED = -1
LEFT_HANDED  =  1


from geometry.VQT import V, Q, norm, cross  
from geometry.VQT import  vlen
from Numeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets

from dna.generators.Z_Dna_Generator import Z_Dna_Generator
Пример #6
0
@author: Mark Sims
@version: $Id$
@copyright: 2004-2008 Nanorex, Inc.  See LICENSE file for details.

History:

Mark 2007-10-18:
- Created. Major rewrite of DnaGenHelper.py.
"""

import foundation.env as env
from platform_dependent.PlatformDependent import find_plugin_dir
from utilities.Log      import orangemsg

from dna.model.Dna_Constants import dnaDict
basepath_ok, basepath = find_plugin_dir("DNA")
if not basepath_ok:
    env.history.message(orangemsg("The cad/plugins/DNA directory is missing."))

RIGHT_HANDED = -1

from dna.generators.Dna_Generator import Dna_Generator


class A_Dna_Generator(Dna_Generator):
    """
    Provides an atomistic model of the A form of DNA.

    The geometry for A-DNA is very twisty and funky. We need to to research
    the A form since it's not a simple helix (like B) or an alternating helix
    (like Z).