Hi,
I need an easy and quick method to only convert an abinit input file to a standard
output file (e.g. XYZ-format), which can be read easily by graphical software.
This allows me to verify the atoms' coordinates before starting a DFT calculation.
I am using VMD as my graphical toolkit. It cannot read abinit files natively, but
i already have written a plugin that converts abinit output files (DEN, GEO files)
for visualization. The DEN and GEO files are standardized and easy to convert.
I'd like to read the input file too in order to double-check the initial coordinates and
structure of the atoms. The incredible flexibility of entering the coordinates of the atoms
into the input file (convenient for the user!) is a nightmare for writing a conversion plugin!!!
Hence my request to faciliate abinit with a conversion using its own input parser and
just output an easy output format without doing DFT. For example:
abinit -xyz myinput.files > myinput.XYZ
(or any other standardized output for atomic structure & coordinates).
Thanks!
Rob.
Easy/standard way to get XYZ-style output from input file
-
- Posts: 35
- Joined: Wed Jan 20, 2010 3:08 am
Re: Easy/standard way to get XYZ-style output from input fil
Hello,
I would suggest to write a plugin for VMD instead (!). It's not a joke, instead of making ABINIT heavier with dumping in whatever format people are using, I've made possible the ABINIT parser to be available from the C. Like that one can link with the library compiled in ABINIT/bindings/parser and being able to read natively all ABINIT input files.
I've done this for my visualisation software (V_Sim), and I would be pleased to help anyone who would like to add ABINIT parser capabilities to their favorite visualisation tool. The code is really simple and looks like this (skipping error checkings):
I would suggest to write a plugin for VMD instead (!). It's not a joke, instead of making ABINIT heavier with dumping in whatever format people are using, I've made possible the ABINIT parser to be available from the C. Like that one can link with the library compiled in ABINIT/bindings/parser and being able to read natively all ABINIT input files.
I've done this for my visualisation software (V_Sim), and I would be pleased to help anyone who would like to add ABINIT parser capabilities to their favorite visualisation tool. The code is really simple and looks like this (skipping error checkings):
Code: Select all
dt = ab6_invars_new_from_file(filename);
error = ab6_invars_get_ndtset(dt, &ndtset);
/* Reading dataset #nSet from ndtset. */
error = ab6_invars_get_integer(dt, AB6_INVARS_NTYPAT, nSet + 1, &ntypat);
error = ab6_invars_get_integer(dt, AB6_INVARS_NATOM, nSet + 1, &natom);
typat = g_malloc(sizeof(int) * natom);
error = ab6_invars_get_integer_array(dt, typat, natom,
AB6_INVARS_TYPAT, nSet + 1);
znucl = g_malloc(sizeof(double) * ntypat);
error = ab6_invars_get_real_array(dt, znucl, ntypat,
AB6_INVARS_ZNUCL, nSet + 1);
error = ab6_invars_get_real_array(dt, (double*)rprimd, 9,
AB6_INVARS_RPRIMD_ORIG, nSet + 1);
coord = g_malloc(sizeof(double) * 3 * natom);
error = ab6_invars_get_real_array(dt, coord, 3 * natom,
AB6_INVARS_XRED_ORIG, nSet + 1);