[ase-users] bug report: ASE-3.21.1, xsd to VASP POSAR
David Willock
WillockDJ at cardiff.ac.uk
Tue Apr 20 13:42:52 CEST 2021
Dear Huan Wang
We have also been trying to have a way to work with VASP in Materials Studio and set or preserve constraints on atoms.
I had a look at the source of read_xsd and it seems to only pick up atom and cell information. You can pick out the data from the
file directly by doing a read in python directly and then assign the constraints. The attached is an attempt to get this to work.
To try this in your Anaconda install change sys.argv[1] to "Pt_slab.xsd"
or on a linux machine use:
python3 ase_xsd_to_poscar.py Pt_slab.xsd
However, the flags you highlight don't seem to be a direct map to the atom list, so the wrong atoms are fixed.
Do you know the format of the constraint flags in the xsd file? How did you define the constraints in Materials Studio?
Best Wishes
David
Dr David J. Willock
Reader
Cardiff Catalysis Institute
School of Chemistry
Cardiff University
Main Building
Park Place
Cardiff
CF10 3AT
Phone: +44 (0) 29 208 74779
Dr David J. Willock
Darllenydd
Sefydliad Catalyddu Caerdydd
Ysgol Cemeg
Prifysgol Caerdydd
Prif adeilad y
Plas-Y-Parc
Caerdydd
CF10 3AT
Ffôn : +44 (0) 29 208 74779
/*****************************************************/
Molecular Symmetry :
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470853484.html
Cymesuredd Moleciwlaidd :
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470853484.html
/*****************************************************/
________________________________
From: ase-users <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of 王欢 via ase-users <ase-users at listserv.fysik.dtu.dk>
Sent: 20 April 2021 10:25
To: ase-users at listserv.fysik.dtu.dk <ase-users at listserv.fysik.dtu.dk>
Subject: [ase-users] bug report: ASE-3.21.1, xsd to VASP POSAR
External email to Cardiff University - Take care when replying/opening attachments or links.
Nid ebost mewnol o Brifysgol Caerdydd yw hwn - Cymerwch ofal wrth ateb/agor atodiadau neu ddolenni.
Dear ASE developers,
I installed ASE (v3.21.1) via anaconda. When I converted the xsd file (with two-bottom-layer atoms constrained) to VASP POSCAR file, the result did not show "Selective dynamics" line, and was NOT able to label the constraints with "F" in the POSCAR file.
My simple code is shown below.
#######
from ase.io import xsd, vasp
vasp.write_vasp("POSCAR", xsd.read_xsd("Pt_slab.xsd"), direct=True, vasp5=True, ignore_constraints=False)
#######
I was wondering if the xsd.read_xsd() method be able to parse the constraint label, i.e. Constraint="1,0,0,0,0,1,0,0,0,0,1,0", in the xsd file.
I also noticed that the ase.constraints objects provided approaches to fix atoms. However, the arguments of the vasp.write_vasp() method do not show any flag to accept the constrained atoms. The only related argument is "ignore_constraints", which accepts the Boolean type, not the coordinates of atoms.
Attached please fine the "Pt_slab.xsd" file.
Looking forward to hearing replies from you.
All the best,
Dr. Huan Wang
huan.wang at whut.edu.cn<mailto:huan.wang at whut.edu.cn>
School of Materials Science and Engineering
Wuhan University of Technology
No. 122, Luoshi Road, Wuhan, 430070, P. R. China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210420/454c0e73/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ase_xsd_to_poscar.py.txt
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210420/454c0e73/attachment-0001.txt>
More information about the ase-users
mailing list