vaspoutcarplugin.c (pymol-v1.8.6.0.tar.bz2) | : | vaspoutcarplugin.c (pymol-v2.1.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 140 | skipping to change at line 140 | |||
if (atomcount != data->numatoms) { | if (atomcount != data->numatoms) { | |||
fprintf(stderr, "\n\nVASP OUTCAR read) ERROR: file '%s' does not have number of each atom.\n", data->filename); | fprintf(stderr, "\n\nVASP OUTCAR read) ERROR: file '%s' does not have number of each atom.\n", data->filename); | |||
return MOLFILE_ERROR; | return MOLFILE_ERROR; | |||
} | } | |||
/* Read POTCAR file to determine atom types. | /* Read POTCAR file to determine atom types. | |||
* Each atom type section in POTCAR starts with a line | * Each atom type section in POTCAR starts with a line | |||
* that contains the name of the element (H, He, C etc.). | * that contains the name of the element (H, He, C etc.). | |||
* Otherwise try to find similar mass in periodic table. | * Otherwise try to find similar mass in periodic table. | |||
*/ | */ | |||
if (strstr(potcarfile, "OUTCAR")) { | if (strstr(data->filename, "OUTCAR")) { | |||
strcpy(potcarfile, data->filename); | strcpy(potcarfile, data->filename); | |||
strcpy(strstr(potcarfile, "OUTCAR"), "POTCAR"); | strcpy(strstr(potcarfile, "OUTCAR"), "POTCAR"); | |||
potcar = fopen(potcarfile, "r"); | potcar = fopen(potcarfile, "r"); | |||
} else { | } else { | |||
potcar = NULL; | potcar = NULL; | |||
} | } | |||
for (atomcount = i = 0; atomcount < data->numatoms; ++i) { | for (atomcount = i = 0; atomcount < data->numatoms; ++i) { | |||
char const *label; | char const *label; | |||
float mass, radius; | float mass, radius; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |