[ase-users] How to check if a POSCAR file has constraints?
fabian
Fabian.T89 at web.de
Thu Feb 1 08:55:03 CET 2018
Dear Duy Le,
Thank you for your answer! I think now i got it....
So the list of constraints is not "non existent" but only "empty"?
Than i could use:
if not atoms.constraints:
do something......
No?
all the best
fabian
Am 31.01.2018 um 16:45 schrieb Duy Le:
> There maybe better way but you can simply use
> len(atoms.constraints)
>
> 0: no constraint
>
> On Wed, Jan 31, 2018 at 9:55 AM, fabian via ase-users
> <ase-users at listserv.fysik.dtu.dk
> <mailto:ase-users at listserv.fysik.dtu.dk>> wrote:
>
> Dear all,
>
> I want to check if a certain POSCAR file has constraints or not.
>
> I tried it like this:
>
> atoms=read(FILENAME)
>
> if atoms.constraints is None:
>
> pass
>
> else:
>
> do something
>
> but this does not work it seems. Even if no constraints are
> present i still come out of the else statement.
>
> On a side not...what library is ASE using to display the ase gui ?
> I have no menu entrys and the gui is broken
> under ubuntu artfull.
>
> All the best
>
> fabian
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> <mailto:ase-users at listserv.fysik.dtu.dk>
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> <https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180201/a9d7c4b9/attachment-0001.html>
More information about the ase-users
mailing list