#!perl #This is perl script for converting the Materials Studio xsd file to the POSCAR file for VASP. #xsd2pos.pl can read the constraints information from the xsd file, and write the constraints to the POSCAR file. #Usage: Change the $filename variable to your xsd file, and it will generate a POSCAR.txt file in the VASP input format. You may copy and paste the text in POSCAR.txt to your POSCAR file.
use strict; use Getopt::Long; use MaterialsScript qw(:all);
# Input the file name without suffix. my $filename = "4N_epoxy1";
# Input whether fix atoms, if you fixed, input Yes, or set it as No. my $Fix = "No"; my $doc = $Documents{"$filename.xsd"}; my $pos = Documents->New("POSCAR.txt"); my $lattice = $doc->SymmetryDefinition; my $FT; my @num_atom; my @element; my $ele; my $num;
[jason@cabc1 1N3O]$ for i in$elements; docat"$POT_file"/$i/POTCAR >> POTCAR; done /POTCAR: No such file or directory
#根据上面的报错可以看出是目录有问题,那么看看elements这个变量里面有些啥 [jason@cabc1 1N3O]$ for i in$elements; docat$POT_file/$i/POTCAR >> POTCAR; echo$i; done C N O Mn /POTCAR: No such file or directory
#This script can help you process a batch of POSCAR files, it could automatically assign folders and create corresponding pseudopotential files, and copy the INCAR, KPOINTS and the mission-sub file to the folders, and sub the calculate mission. #Remember To Modify your own pseudopotential file location! #This script is using sbatch order to sub mission! #If your own server do not user sbatch order, remember change it! #Last Modified in 20230207 By Phoenix Jason Wang, DUT