radi0sus / xyz2tab Goto Github PK
View Code? Open in Web Editor NEWConvert XYZ data to bond lengths & angles, calculate contacts, planes and dihedral angles and print tables
License: BSD 3-Clause "New" or "Revised" License
Convert XYZ data to bond lengths & angles, calculate contacts, planes and dihedral angles and print tables
License: BSD 3-Clause "New" or "Revised" License
Hi,
Thanks for your code!
After calculating the bond length, if this code could add the function of "color the bond according to different bond lengths"? And the range of the color bar also could be tuned.
Thank you!!!
Best regards,
Lulu
Is there any option to calculate the distance between specific atoms? I have considered changing my .xyz files such that the atoms are consecutive but maybe there is something already implemented and capable of doing so.
Hi, thank you very much for your code! It has been really useful for me and my research!
Just one small question: is there anyway of getting rid of the atomic labels when the visualization option is enabled for showing a molecular plane?
python3 xyz2tab.py h2o.com
Traceback (most recent call last):
File "xyz2tab.py", line 19, in
sys.stdout.reconfigure(encoding='utf-8')
AttributeError: '_io.TextIOWrapper' object has no attribute 'reconfigure'
After commenting line 19 I get:
python3 xyz2tab.py h2o.com
Filename : h2o.com
Number of atoms : 3
Sum formula : H₂O
Formula weight : 18.02 g/mol
Excluded atoms : None
Excluded elements : None
Included contacts : None
Covalent radius + : 8.00 %
Element | Atom count | Mass fraction /% | Cov. radius /Å | Cov. radius + /Å |
---|---|---|---|---|
H | 2 | 11.19 | 0.31 | 0.33 |
O | 1 | 88.81 | 0.66 | 0.71 |
Traceback (most recent call last): | ||||
File "xyz2tab.py", line 442, in |
dist_df['cov_radius2'])+(dist_df['cov_radius1'] +
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/pandas/core/ops/init.py", line 1048, in wrapper
result = na_op(lvalues, rvalues)
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/pandas/core/ops/init.py", line 965, in na_op
import pandas.core.computation.expressions as expressions
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/pandas/core/computation/expressions.py", line 19, in
from pandas.core.computation.check import _NUMEXPR_INSTALLED
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/pandas/core/computation/check.py", line 3, in
ne = import_optional_dependency("numexpr", raise_on_missing=False, on_version="warn")
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/pandas/compat/_optional.py", line 90, in import_optional_dependency
module = importlib.import_module(name)
File "/Users/derwiszck/anaconda3/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/numexpr/init.py", line 48, in
nthreads = _init_num_threads()
File "/Users/derwiszck/anaconda3/lib/python3.6/site-packages/numexpr/utils.py", line 137, in _init_num_threads
requested_threads = int(os.environ['OMP_NUM_THREADS'])
ValueError: invalid literal for int() with base 10: '2,1'
derwiszck
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.