User-Defined SNAN+FNAN not working? |
- Date: 2020/05/16 16:19
- Name: Kelvin
- Dear OpenMX,
I've been trying to use user-defined FNAN+SNAN as outlined in http://www.openmx-square.org/openmx_man3.9/node78.html
However, I noted that the OpenMX program has been ignoring the '<orderN.FNAN+SNAN' tag in my input files, and the calculation went ahead with default values. When I looked at the source code Input_std.c, I found that the input parser tries to look for '<orderN.FNAN.SNAN' instead of '<orderN.FNAN+SNAN' (see below). The OpenMX I'm using is v3.9 + v.3.9.2 patch from http://www.openmx-square.org/download.html
My questions are:
1. Have I misunderstood the manual and the source code, and I should instead continue using '<orderN.FNAN+SNAN' in my input file (perhaps together with some other tags)?
2. The fscanf function (fscanf(fp,"%i %i %i",&j,&orderN_FNAN[i],&orderN_SNAN[i])) seems to read three values (i.e. an index, an FNAN value, and an SNAN value) instead of two values as outlined in the manual (i.e. an index and a FNAN+SNAN value). May I ask for clarification on which one is correct?
Thank you
Regards, Kelvin
######### SOURCE: Input_std.c #########
~/opx/openmx3.9/source> grep -A 20 "FNAN.SNAN" Input_std.c orderN_FNAN_SNAN_flag = 0;
if (fp=input_find("<orderN.FNAN.SNAN")) {
orderN_FNAN_SNAN_flag = 1;
for (i=1; i<=atomnum; i++){ fscanf(fp,"%i %i %i",&j,&orderN_FNAN[i],&orderN_SNAN[i]);
if (i!=j) { if (myid==Host_ID){ printf("Format error for orderN.FNAN.SNAN\n"); }
MPI_Finalize(); exit(0); } }
if (! input_last("orderN.FNAN.SNAN>")) { /* format error */
po++;
if (myid==Host_ID){ printf("Format error for orderN.FNAN+SNAN\n"); } MPI_Finalize(); exit(0); } }
| |