2
$\begingroup$

I am trying to use scikit-nano package to build the various isomers of fullerenes. However, none of the methods that is presented in the manual seem to work for installing the package.

These are the steps that I tried for installing the package

  1. pip install scikit-nano: keeps searching for dependencies for ~ 15 minutes after which I cancelled the installation.
  2. building from the source: installation would be completed, but the import fails with string literal error.
>>> from sknano.generators import FullereneGenerator
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hemanthharidas/scikit-nano/sknano/generators/__init__.py", line 6, in <module>
    from .base import *
  File "/home/hemanthharidas/scikit-nano/sknano/generators/base.py", line 24, in <module>
    from sknano.core.structures import StructureBase
  File "/home/hemanthharidas/scikit-nano/sknano/core/structures/__init__.py", line 10, in <module>
    from .fullerenes import *
  File "/home/hemanthharidas/scikit-nano/sknano/core/structures/fullerenes.py", line 98, in <module>
    class Fullerene(CrystalStructureBase):
  File "/home/hemanthharidas/scikit-nano/sknano/core/structures/fullerenes.py", line 123, in Fullerene
    _data = load_fullerene_data()
  File "/home/hemanthharidas/scikit-nano/sknano/core/structures/fullerenes.py", line 54, in load_fullerene_data
    Niso = int(Niso)
ValueError: invalid literal for int() with base 10: 'Ih'

When I tried to create an issue on the GitHub page, it seems that the project has been long abandoned, with 5 issues open and the last commit being made approximately 8 years ago.

Does anyone have any pointers on how to install this package? My end goal is to test a set of force field parameters on these structures, and manually building them would be cumbersome, even though doable.

$\endgroup$

1 Answer 1

1
$\begingroup$

I was able to get sknano up and running on python 3.10.12 on Google Colab. enter image description here

Here is the script in case you want to have a look. Colab-Script

I needed to tweak a few files to get it running on python 3.10.12, due to changes in default modules.

Here are the changes:

In the file:

/usr/local/lib/python3.10/dist-packages/sknano/core/_itertools.py

Change the import line:

from collections import Iterable

To:

from collections.abc import Iterable

In the files:

/usr/local/lib/python3.10/dist-packages/sknano/core/math/_extras.py
/usr/local/lib/python3.10/dist-packages/sknano/structures/_swnt.py

Change the line:

from fractions import gcd

To:

from math import gcd
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .