Re: [Spglib-users] Issue with pyspglib
Brought to you by:
atztogo
From: Atsushi T. <atz...@gm...> - 2015-07-06 07:24:07
|
What is the difficult point of the document below? http://spglib.sourceforge.net/pyspglibForASE/ Togo On Mon, Jul 6, 2015 at 4:11 PM, Éric Germaneau <ger...@sj...> wrote: > Hey, > > I think it's from atoms module. > Something has changed in the way to use it but I don't know what. > I also forgot why I needed this module actually. > I'm really wondering how do people do this thing now, it's maybe not require > anymore. > Thanks, > > Éric. > > > On 07/06/2015 03:02 PM, Atsushi Togo wrote: > > Hi, > > Where is your Atoms class installed? > > Togo > > On Mon, Jul 6, 2015 at 8:34 AM, Éric Germaneau <ger...@sj...> > wrote: > > 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) > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Spglib-users mailing list > Spg...@li... > https://lists.sourceforge.net/lists/listinfo/spglib-users > > > > > -- > É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 > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Spglib-users mailing list > Spg...@li... > https://lists.sourceforge.net/lists/listinfo/spglib-users > -- Atsushi Togo http://atztogo.github.com/ atz...@gm... |