glotzerlab / fedorov Goto Github PK
View Code? Open in Web Editor NEWA python package to initialize different crystal structures
License: BSD 3-Clause "New" or "Revised" License
A python package to initialize different crystal structures
License: BSD 3-Clause "New" or "Revised" License
It seems that for all the triclinic and monoclinic structures in the aflow database, the angular lattice params are all improperly stored in basis params.
Verified with the following code snippet.
for i,name in crystal_database.AflowPrototype.Aflow_database['id'].iteritems():
cdbs=crystal_database.AflowPrototype(i,print_info=False)
keys=set(cdbs.lattice_params.keys())
if name.startswith('a'): #triclinic
try:
assert(keys==set(('a','b','c','alpha','beta','gamma')))
print('it worked for '+name)
except:
keys.update(filter(lambda k:not k[0] in ['x','y','z'],cdbs.basis_params.keys()))
assert(keys==set(('a','b','c','alpha','beta','gamma')))
elif name.startswith('m'): #monoclinic
try:
assert(keys==set(('a','b','c','beta')))
print('it worked for '+name)
except:
keys.update(filter(lambda k:not k[0] in ['x','y','z'],cdbs.basis_params.keys()))
assert(keys==set(('a','b','c','beta')))
elif name.startswith('o'): #orthorhombic
assert(keys==set(('a','b','c')))
elif name.startswith('t'): #tetragonal
assert(keys==set(('a','c')))
elif name.startswith('hR'): #rhombohedral
assert(keys==set(('a','alpha')))
elif name.startswith('h'): #hexagonal
assert(keys==set(('a','c')))
elif name.startswith('c'): #cubic
assert(keys==set(('a')))
else:
raise(name+'not start with a Pearson symbol')
All the excepts are necessary and it outputs nothing meaning that no 'a' or 'm' Pearson symbols from the database works.
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.