Skip to content

Installing and Utilizing Nuskell #2

@jphuse

Description

@jphuse

Hello!

I know the last commit was over two years ago so I apologize for reopening this if it is deprecated. Please let me know if there is any assistance you can give as the documentation is not very friendly to someone who has never used the Nuskell library before.

I attempted installing Nuskell (of which the only way is by downloaded the source code and running python3 -m setup install --user) and it through errors and was difficult to troubleshoot as it kept saying I didn't have access to the egg file. Once I finally was able to get past this, I was trying to use Nuskell in a test python file where I tried the Quickstart python script in the documentation (found at https://www.dna.caltech.edu/~badelt/nuskell/#quickstart). Because it's a local install, I had to adjust the imports to handle the local build from the setup.py file. Here is the script and it's errors:

NuskellTest.py

from nuskell.build.lib.nuskell.dsdcompiler import translate, verify

testtube = translate('A+B->C', scheme='soloveichik2010.ts')

# Get the enumerated CRN
testtube.enumerate_reactions()

# Interpret the enumerated CRN, i.e. replace history species
interpretation = testtube.interpret_species(['A', 'B', 'C'], prune=True)

# Formulate reversible reactions as two irreversible reactions.
fcrn = [[['A', 'B'], ['C']]]
vcrn = []
for r in testtube.reactions:
    rxn = [map(str, r.reactants), map(str, r.products)]
    vcrn.append(rxn)

v = verify(fcrn, vcrn, fs, method='bisimulation')

if v:
    print("Input CRN and TestTube-Species are CRN bisimulation equivalent.")
else:
    print("Input CRN and TestTube-Species are not CRN bisimulation equivalent.")

Errors:

Traceback (most recent call last):
  File "C:\Users\jhuse\anaconda3\envs\GitHub\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/jhuse/OneDrive - University of Kentucky/Research/DNA Computing/GitHub/build/NuskellTest.py", line 2, in <module>
    from nuskell.build.lib.nuskell.dsdcompiler import translate, verify
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\jhuse\OneDrive - University of Kentucky\Research\DNA Computing\GitHub\build\nuskell\build\lib\nuskell\dsdcompiler\__init__.py", line 15, in <module>
    from .compiler import (translate, 
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\jhuse\OneDrive - University of Kentucky\Research\DNA Computing\GitHub\build\nuskell\build\lib\nuskell\dsdcompiler\compiler.py", line 17, in <module>
    from .interpreter import NuskellEnvironment 
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\jhuse\OneDrive - University of Kentucky\Research\DNA Computing\GitHub\build\nuskell\build\lib\nuskell\dsdcompiler\interpreter.py", line 23, in <module>
    from .objects import NuskellDomain, NuskellComplex, SingletonError
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\jhuse\OneDrive - University of Kentucky\Research\DNA Computing\GitHub\build\nuskell\build\lib\nuskell\dsdcompiler\objects.py", line 9, in <module>
    from dsdobjects import (SingletonError, clear_singletons)
  File "C:\Program Files\JetBrains\PyCharm 2022.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'dsdobjects'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions