[ase-users] Attribute error with positions
Iyemperumal, Satish Kumar
siyemperumal at WPI.EDU
Thu Jan 21 20:32:27 CET 2016
Hi Abhirup
I use the following
list = []
s = read("fname.POSCAR")
for i in s:
list.append(i.position[2])
Best,
Satish
________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at listserv.fysik.dtu.dk] on behalf of Abhirup Patra [tuf43805 at temple.edu]
Sent: Thursday, January 21, 2016 12:24 PM
To: ase-users at listserv.fysik.dtu.dk
Subject: [ase-users] Attribute error with positions
Hi All,
I am trying to get the inter layer distance between the layers of the surface slab from using the
CONTCATR of the VASP .
But when I am trying to read the z-coordinates of the atoms using 'positions' attribute
I am getting the error as -
AttributeError: 'file' object has no attribute 'positions'
Here is what i have imported in my code-
import ase.io<http://ase.io>
from ase import Atoms
from ase.io<http://ase.io> import read
from ase.io<http://ase.io> import write
from ase import *
import numpy as np
Can anyone please give me any idea where I am going wrong ?
Thanks,
More information about the ase-users
mailing list