Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nickcafferry committed Jul 22, 2020
1 parent 8b15eaf commit 392d595
Show file tree
Hide file tree
Showing 12 changed files with 94,877 additions and 0 deletions.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
100 changes: 100 additions & 0 deletions Neural-Network-Learning-of-Free-Energy-Surface/INPUT.txt

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Neural-Network-Learning-of-Free-Energy-Surface/L2_error.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
double s1,s2,fe_nn,fe,cost,sum,L2_error;
int npts,i;
FILE *infile;

printf("Input the number of points in the validation set\n");
scanf("%d",&npts);
infile = fopen("output.txt","r");

sum = 0.0;
for(i = 1; i <= npts; i++){
fscanf(infile,"%lf %lf %lf %lf %lf",&s1,&s2,&fe_nn,&fe,&cost);
sum += (fe_nn - fe)*(fe_nn - fe);
}
L2_error = sqrt(sum/((double) npts));
printf("L2_error = %.12g\n",L2_error);
return 0;

}
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions Neural-Network-Learning-of-Free-Energy-Surface/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CXX = icc
CC = icc

EXEC = Machine_Learning.exe

Fast_CG = CG_Network_Streamlined.o

MKLROOT = /opt/intel/mkl
CXXFLAGS = -O2 -Wall -fopenmp
INCLUDE = -DMKL_ILP64 -m64 -I${MKLROOT}/include
LDLIBS = -L${MKLROOT}/lib/intel64_lin -lmkl_intel_ilp64 -lmkl_scalapack_ilp64 -lmkl_cdft_core -lmkl_core -lmkl_sequential -lmkl_blacs_ilp64 -lpthread -lm -ldl -fopenmp

fast_cg : copy_c $(Fast_CG)
$(CXX) $(Fast_CG) $(CXXFLAGS) $(LDLIBS) -o ./$(EXEC)

copy_c :
#cp Fast_Conjugate_Network.cpp Fast_Conjugate_Network.c

clean:
rm -f *.o
rm -f $(EXEC)


%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $(<) $(outputs)


0 comments on commit 392d595

Please sign in to comment.