tony-y / cgnn Goto Github PK
View Code? Open in Web Editor NEWCrystal Graph Neural Networks
Home Page: https://tony-y.github.io/cgnn/
License: Apache License 2.0
Crystal Graph Neural Networks
Home Page: https://tony-y.github.io/cgnn/
License: Apache License 2.0
pip and conda can not search pymatgen=2018.12.12
other versions installed through conda can not access MySQL oqmd database, running your oqmd script has bugs.
How do I solve these problems?
conda create --name qmpy
conda install -n qmpy scikit-learn matplotlib python=2.7
source activate qmpy
pip install pymatgen==2018.12.12 monty==1.0.3
pip install qmpy==1.2.0 ase==3.17
pip install pydash tqdm joblib
I have tried some relaxed structures of the Material Project dataset to construct suitable crystal graphs. These data are from a Kyoto University’s project phonondb@kyoto-u. I use the package pymatgen to import these structures to mp_graph.py.
With the tools mp_graph.py, I found that except for some structures with the same tetrahedral configuration as SiO2, such as Si (mp-149) and SiC(mp-7140) most of structures' crystal graphs have the two problems:
Crystal Graphs are undirected graphs, so any two adjacent atoms should be connected to each other.
The first problem is caused by the clustering algorithm. The k-means cluster used in mp_graph.py is to find the nearest atom cluster to the target atom. However, in a situation that Atom A is only connected to Atom B while Atom B is connected to many atoms and A-B distance is not the shortest, the clustering algorithm will exclude the connection from B to A but retain the connection from A to B.
The second problem is caused by expressing the distance by percentage instead of absolute distance. The father atom has a bigger radius, so the percent distance is smaller in fact. Because of the reason, the k-means algorithm will exclude the nearest atom.
Hello developer, thanks for your code and research. It's helped a lot. But there is a question when I run python ../tools/oqmd_data.py
, could you teach me how to solve this problem?
Traceback (most recent call last):
File "../tools/oqmd_data.py", line 128, in
main(**options)
File "../tools/oqmd_data.py", line 110, in main
entries = get_valid_entries()
File "../tools/oqmd_data.py", line 34, in get_valid_entries
return list(entries)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/models/query.py", line 162, in iter
self._fetch_all()
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all
self._result_cache = list(self.iterator())
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/models/query.py", line 1217, in iterator
for row in compiler.results_iter():
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 794, in results_iter
results = self.execute_sql(MULTI)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/utils.py", line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/dell/anaconda3/envs/ElemNet/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.ProgrammingError: (1146, "Table 'oqmd_v1_2.calculations' doesn't exist")
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.