Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions models/ZnS.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ZnS fixed cell
CRYSTAL
PRIMVEC
0.0000000 2.7100000 2.7100000
2.7100000 0.0000000 2.7100000
2.7100000 2.7100000 0.0000000
PRIMCOORD
2 1
16 0.0000000 0.0000000 0.0000000
30 1.3550000 -1.3550000 -1.3550000
15 changes: 15 additions & 0 deletions models/ZnS_fixed_cell.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ZnS fixed cell
ANIMSTEPS 2
CRYSTAL
PRIMVEC
0.0000000 2.7100000 2.7100000
2.7100000 0.0000000 2.7100000
2.7100000 2.7100000 0.0000000
PRIMCOORD 1
2 1
16 0.0000000 0.0000000 0.0000000
30 1.3550000 -1.3550000 -1.3550000
PRIMCOORD 2
2 1
16 0.0000000 0.0000000 0.0000000
30 1.2550000 -1.2550000 -1.2550000
27 changes: 27 additions & 0 deletions models/ZnS_variable_cell.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ZnS variable cell
ANIMSTEPS 2
CRYSTAL
PRIMVEC 1
2.7100000 2.7100000 0.00000000
2.7100000 0.0000000 2.71000000
0.0000000 2.7100000 2.71000000
CONVVEC 1
5.4200000 0.0000000 0.00000000
0.0000000 5.4200000 0.00000000
0.0000000 0.0000000 5.42000000
PRIMCOORD 1
2 1
16 0.0000000 0.0000000 0.00000000
30 1.3550000 -1.3550000 -1.35500000
PRIMVEC 2
2.9810000 2.9810000 0.00000000
2.9810000 0.0000000 2.98100000
0.0000000 2.9810000 2.98100000
CONVVEC 2
5.9620000 0.0000000 0.00000000
0.0000000 5.9620000 0.00000000
0.0000000 0.0000000 5.96200000
PRIMCOORD 2
2 1
16 0.0000000 0.0000000 0.00000000
30 1.5905000 -1.5905000 -1.59050000
6 changes: 6 additions & 0 deletions models/water.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Water molecule

ATOMS
8 0.0000 0.0000 0.0000 -0.0516 0.0000 -0.0399
1 0.0000 0.0000 1.0000 0.0176 0.0000 0.0304
1 0.9681 0.0000 -0.2503 0.0339 0.0000 0.0094
19 changes: 19 additions & 0 deletions models/water_anim.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Water molecule animation

ANIMSTEPS 4
ATOMS 1
8 0.0000 0.0000 0.0000 -0.0516 0.0000 -0.0399
1 0.0000 0.0000 1.0000 0.0176 0.0000 0.0304
1 0.9681 0.0000 -0.2503 0.0339 0.0000 0.0094
ATOMS 2
8 -0.1480 0.0000 -0.1146 0.0020 0.0000 0.0015
1 -0.0468 0.0000 0.9134 -0.0069 0.0000 0.0069
1 0.8726 0.0000 -0.2740 0.0049 0.0000 -0.0084
ATOMS 3
8 -0.1032 0.0000 -0.0799 0.0013 0.0000 0.0010
1 -0.0319 0.0000 0.9591 0.0011 0.0000 -0.0028
1 0.9205 0.0000 -0.2710 -0.0025 0.0000 0.0018
ATOMS 4
8 -0.1102 0.0000 -0.0853 0.0001 0.0000 0.0000
1 -0.0345 0.0000 0.9503 -0.0000 0.0000 -0.0000
1 0.9114 0.0000 -0.2714 -0.0000 0.0000 -0.0000
19 changes: 16 additions & 3 deletions src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ The GNU GPL can also be found at http://www.gnu.org
extern struct sysenv_pak sysenv;
extern struct elem_pak elements[];

/***************************************/
/* setup the recognized file type list */
/***************************************/
/****************************************/
/* set up the recognized file type list */
/****************************************/
Comment on lines +59 to +61

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already in PR #48

#define DEBUG_FILE_INIT 0
void file_init(void)
{
Expand Down Expand Up @@ -677,6 +677,19 @@ file_data->read_file = read_xml;
file_data->read_frame = NULL; /* frame reading */
sysenv.file_list = g_slist_prepend(sysenv.file_list, file_data);

/* supported file type */
file_data = g_malloc(sizeof(struct file_pak));
file_data->id = XSF;
file_data->group = XSF;
file_data->menu = TRUE;
file_data->label = g_strdup("XSF");
file_data->ext = NULL;
file_data->ext = g_slist_prepend(file_data->ext, "xsf");
file_data->write_file = write_xsf;
file_data->read_file = read_xsf;
file_data->read_frame = read_xsf_frame; /* frame reading */
sysenv.file_list = g_slist_prepend(sysenv.file_list, file_data);

/* supported file type */
file_data = g_malloc(sizeof(struct file_pak));
file_data->id = XTL;
Expand Down
3 changes: 3 additions & 0 deletions src/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ gint write_gmf(gchar *, struct model_pak *);
gint write_planes(gchar *, struct model_pak *);
gint write_marvin(gchar *, struct model_pak *);
gint write_xml(gchar *, struct model_pak *);
gint write_xsf(gchar *, struct model_pak *);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already in PR #48

gint write_xtl(gchar *, struct model_pak *);
gint write_xyz(gchar *, struct model_pak *);
gint write_gms(gchar *, struct model_pak *);
Expand Down Expand Up @@ -142,6 +143,7 @@ gint read_marvin(gchar *, struct model_pak *);
gint read_mvnout(gchar *, struct model_pak *);
gint read_sout(gchar *, struct model_pak *);
gint read_xml(gchar *, struct model_pak *);
gint read_xsf(gchar *, struct model_pak *);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already in PR #48

gint read_xtl(gchar *, struct model_pak *);
gint read_xyz(gchar *, struct model_pak *);
gint read_using_babel(gchar *, struct model_pak *);
Expand Down Expand Up @@ -189,6 +191,7 @@ gint read_qe_out_frame(FILE *, struct model_pak *);
gint read_xyz_frame(FILE *, struct model_pak *);
gint read_dlpoly_frame(FILE *, struct model_pak *);
gint read_dmol_frame(FILE *, struct model_pak *);
gint read_xsf_frame(FILE *, struct model_pak *);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already in PR #48


/*NEW: track/update frames (TODO)*/
gint update_frame_uspex(gint idx,struct model_pak *model);
Expand Down
Loading