[Spglib-users] Issue with pyspglib
Brought to you by:
atztogo
From: Éric G. <ger...@sj...> - 2015-07-05 23:34:34
|
Dear all, I use to use pyspglib two years ago but recently got an issue. The following simple script doesn't work anymore: #!/usr/bin/python from numpy import * from pyspglib import spglib from atoms import * lattice = array([[4.,0.,0.], [0.,4.,0.], [0.,0.,3.]]) position = array([ [0.0, 0.0, 0.0], [0.5, 0.5, 0.5], [0.3, 0.3, 0.0], [0.7, 0.7, 0.0], [0.2, 0.8, 0.5], [0.8, 0.2, 0.5] ]) atom_type = array([1,1,2,2,2,2]) atom_symbols = ['H', 'H', 'He', 'He', 'He', 'He'] atoms = Atoms( cell=lattice, scaled_positions=position, symbols=atom_symbols ) print atoms.symbols print atoms.numbers print spglib.get_spacegroup(atoms, 1e-5) Here is the error I get: Traceback (most recent call last): File "./example2.py", line 18, in <module> atoms = Atoms( cell=lattice, scaled_positions=position, symbols=atom_symbols ) *NameError: name 'Atoms' is not defined* I've installed atoms 0.1 and pyspglib 1.6.0.13 via pip. Can someone tell what changed and how to run this script now? Thanks. -- Éric Germaneau (艾海克), Specialist Center for High Performance Computing Shanghai Jiao Tong University Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240 China Email:ger...@sj... Mobi:+86-136-4161-6480 http://hpc.sjtu.edu.cn * Chinese (Simplified) - detected * English * Chinese (Simplified) * English * Chinese (Simplified) <javascript:void(0);><#> |