Giter Site home page Giter Site logo

blender-chemicals's People

Contributors

patrickfuller avatar pyxidatol-c avatar slashme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender-chemicals's Issues

It can`t open blender

when i input this “blender-chemicals c1ccccc1” ,get a mistake:blender-chemicals : 无法将“blender-chemicals”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如
果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1

  • blender-chemicals c1ccccc1
  •   + CategoryInfo          : ObjectNotFound: (blender-chemicals:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

what should i do? thank you!

blender didn't work

when i input blender-chemicals c1ccccc1, conda shows me:

——————————————————————————————————
(blender) PS C:\Users\Administrator> blender-chemicals c1ccccc1
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open aromatic.txt defaulting to compiled data.
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open atomtyp.txt defaulting to compiled data.
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open element.txt defaulting to compiled data.
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open phmodel.txt defaulting to compiled data.
==============================
*** Open Babel Error  in OpenBabel::OBBuilder::LoadFragments
  Cannot open fragments.txt
==============================
*** Open Babel Error  in OpenBabel::OBForceFieldMMFF94::ParseParamFile
  Cannot open parameter file
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open element.txt defaulting to compiled data.
Could not find installed copy of Blender. Either make sure it's on your path or copy the contents of `drawer.py` into a running blender instance.
————————————————————————————

Blender 2.80 wrong output

Hi,

i just wanted to try out your script with blender 2.80 on a Linux machine. The benzene example just creates a cylinder and a sphere in the middle of the viewport and nothing else.

Maybe something changed in the last 2 years, which version did you use?

Or do you have another idea?

forcefaction

Traceback (most recent call last): File "C:\..b\site-packages\openbabel.py", line 22, in swig_import_helper return importlib.import_module(mname)

image
C:\Users\15020>python -m blender_chemicals.run c1ccccc1
Traceback (most recent call last):
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\site-packages\openbabel.py", line 22, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 658, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 922, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: DLL load failed: 找不到指定的程序。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\site-packages\blender_chemicals\run.py", line 10, in
import pybel
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\site-packages\pybel.py", line 53, in
import openbabel as ob
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\site-packages\openbabel.py", line 25, in
_openbabel = swig_import_helper()
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\site-packages\openbabel.py", line 24, in swig_import_helper
return importlib.import_module('openbabel')
File "C:\Users\15020\AppData\Local\Programs\Python\Python36\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: 找不到指定的程序。

C:\Users\15020>

Windows Issues

Leaving this here for future reference.

I received some comments about running this on windows, and I wanted to address common issues.

First, the conversion command json_formatter.py file type json > molecule.json. This may fail due to an improper open babel install, or due to string encoding (more on this later). For open babel, attempt to reinstall.

Next, the blender command-line command: & 'C:\path\to\blender.exe' -P molecule_to_blender.py. If there is a json encoding issue, it's due to the above problem. The computer is probably not in UTF-8 (generally latin-1). Modernize the encoding, and this goes away. The other issue is around paths. You need to run this command in the blender-chemicals directory for the paths to work.

Proof it works.

windows

can not run from anoconda

blender-chemicals c1ccccc1

Open Babel Warning in OpenBabel::OBGlobalDataBase::Init
Cannot open aromatic.txt defaulting to compiled data.

Open Babel Warning in OpenBabel::OBGlobalDataBase::Init
Cannot open atomtyp.txt defaulting to compiled data.

Open Babel Warning in OpenBabel::OBGlobalDataBase::Init
Cannot open element.txt defaulting to compiled data.

Open Babel Warning in OpenBabel::OBGlobalDataBase::Init
Cannot open phmodel.txt defaulting to compiled data.

Open Babel Error in OpenBabel::OBBuilder::LoadFragments
Cannot open fragments.txt

Open Babel Error in OpenBabel::OBForceFieldMMFF94::ParseParamFile
Cannot open parameter file

Open Babel Warning in OpenBabel::OBGlobalDataBase::Init
Cannot open element.txt defaulting to compiled data.

HI!
I followed the instruction to install the software mentioned in the ReadMe, but when I try to run this program, it will show this on my computer, how can I solve this problem?

os : win10
blender Version: 2.81

Hitting a problem at line with the line: args = sys.argv[sys.argv.index('--') + 1:]

Hello,

I've pasted "draw.py" in the scripting panel and hard-coded the path...everything seems to run well until it gets to the line I put in the title (and below).
Using Blender 2.9

Obviously, I don't get outputs!
To check my hardcoded PATH, I went into Anaconda and ran the lines and asked it to PRINT the JSON in the console. It performed perfectly, so I'm fairly confident of this part.

I wish I could give you the output in the console, but I have none, I'm using Blender portable 2.9...seems to be more stable on my laptop than the installed one.

Thanks in advance!

Bit of code so it gets clearer:

#Hard-coding my location:
PATH = 'C:/Users/UserName/Documents/Molecules_jsons/' #Obviously /UserName/ has the right name, but I removed it here
with open(os.path.join(PATH, 'caffeine.json')) as in_file: #Testing "draw.py" using caffeine.
atom_data = json.load(in_file)

#The part that's giving me headaches

if name == 'main':
"""Uses Blender's limited argv interface to pass args from main script."""
args = sys.argv[sys.argv.index('--') + 1:] #This line stops script in Blender, I've not changed anything from "draw.py"
show_bonds, join = True, True
if '--space-filling' in args:
show_bonds = False
args.remove('--space-filling')
if '--no-join' in args:
join = False
args.remove('--no-join')

try:
    with open(args[0]) as in_file:
        molecule = json.load(in_file)
except IOError:
    molecule = json.loads(args[0])

draw_molecule(molecule, show_bonds=show_bonds, join=join)

UPDATE:
I got Blender to show me the console (Finally, why a separate window!):
Traceback (most recent call last):
File "\draw_molecules.py", line 159, in
ValueError: '--' is not in list
Error: Python script failed, check the message in the system console

Can´t get Blender-chemicals to find blender

Hello,
I´ve been at this for the last couple of days but I can´t get rid of this paticular problem.
I´m not completly certain if I have openbabel properly installed but I really hope so because I followed the instructions as discribed and I can import pybel. I don´t wont to bother you with wrongly installing openbabel as some people already have.

Looking forward to your help and hope as soon as blender-chemicals knows where my blender is it will work and I´ll be happy.

> (python) PS C:\WINDOWS\system32> blender-chemicals c1ccccc1
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open aromatic.txt defaulting to compiled data.
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open element.txt defaulting to compiled data.
> ==============================
> *** Open Babel Error  in OpenBabel::OBBuilder::LoadFragments
>   Cannot open fragments.txt
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open element.txt defaulting to compiled data.
> Could not find installed copy of Blender. Either make sure it's on your path or copy the contents of `drawer.py` into a running blender instance.

OS: Win10
Blender: 2.82
Openbabel: 3.0.12
Blender-chemicals: 0.3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.