Open babel can do it for you.
First all you need is to create a .xyz file then convert to PDB format. > After this, you just need do add an extra line with the crystal cell. > > I am pretty sure you can create your own shell script using sed, , awk, > grep and open babel. The algorithm, could be something like this: > > - find nat flag on pwscf input. ( can be done with grep) > - copy only the number (can be done using awk and defining = as delimiter ) > - write this number in a new file with cat or sed. > - jump 1 line in the file (fixed format xyz issues) > - find the flag ATOMIC_POSITIONS and copy all lines until K_POINTS flag > (can be done using sed) > - write it in your new xyz file. > - run open babel to convert the format. > Now the trick part might be the cell parameters since there are lot of > different ways to define your cell. I would say this step can't be fully > automated without tons of efforts to recognize and follow specific rules > for each case (ibrav type. angles, etc). If you use only a single way to > define your cells, use the same ideas as above and write a new line in your > file with the cell size. > > If you try to develop the script I can help you fixing the bugs/issues on > it and in the end you will learn how to make a new script. :-) > > Let me know if you need further assistance. > > Regards, > Filipe > -- _________________________________________ Filipe Camargo Dalmatti Alves Lima PhD Student University of S?o Paulo, Physics Institute, Materials Physics Department, Nanomol Group, Brazil. Phones: (11) 3091-6881 (USP) (11) 97408-2755 (Vivo) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pwscf.org/pipermail/pw_forum/attachments/20140903/0a54bfe9/attachment.html