.subckt memristorplus plus minus PARAMS:
*Parameters' values
+rmin=100 rmax=390 rinit=390 alpha=1E15 beta=10 gamma=0.1 Vtr=1.5 Vtl=-1.5 yo=0.0001+m=82 fo=310 Lo=5
Gr 0 r value={dr_dt(V(plus)-V(minus))*(st_f(V(plus)-V(minus))*st_f(V(r)-rmin)++st_f(-(V(plus)-V(minus)))*st_f(rmax-v(r)))}
Cr r 01 IC={rinit}
Raux r 0 1E12
*Current equation Imem = V / R(L)
Gpm plus minus value={(V(plus)-V(minus))/((fo*exp(2*L(V(r))))/L(V(r)))}*Func. for non-linear threshold-based behavior
.func dr_dt(y)={-alpha*((y-VtL)/(gamma+abs(y-VtL)))*st_f(-y+VtL)-beta*y*st_f(y-VtL)*+st_f(-y+VtR)-alpha*((y-Vtr)/(gamma+abs(y-VtR)))*st_f(y-VtR)}*Smoothing function
.func st_f(y)={1/(exp(-y/yo)+1)}*L(V) function
.func L(y)={Lo-Lo*m/y}
.ends memristorplus
*Netlist corresponding to schematic of Fig. 1a
Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.subckt memristorminus plus minus PARAMS:
*Parameters' values
+rmin=100 rmax=390 rinit=100 alpha=1E15 beta=10 gamma=0.1 Vtr=-1.5 Vtl=1.5 yo=0.0001+m=82 fo=310 Lo=5
Gr 0 r value={dr_dt(V(plus)-V(minus))*(st_f(V(plus)-V(minus))*st_f(V(r)-rmin)++st_f(-(V(plus)-V(minus)))*st_f(rmax-v(r)))}
Cr r 01 IC={rinit}
Raux r 0 1E12
*Current equation Imem = V / R(L)
Gpm plus minus value={(V(plus)-V(minus))/((fo*exp(2*L(V(r))))/L(V(r)))}*Func. for non-linear threshold-based behavior
.func dr_dt(y)={-alpha*((y-VtL)/(gamma+abs(y-VtL)))*st_f(-y+VtL)-beta*y*st_f(y-VtL)*+st_f(-y+VtR)-alpha*((y-Vtr)/(gamma+abs(y-VtR)))*st_f(y-VtR)}*Smoothing function
.func st_f(y)={1/(exp(-y/yo)+1)}*L(V) function
.func L(y)={Lo-Lo*m/y}
.ends memristorminus
Node 2 is floating - connect a high value resistance between node 2 and ground to overcome this error.
The second problem is with expression used in device Gpm, this is getting evaluated to zero (denominator), you may need to suitably modify it to prevent this.
Gpm plus minus value={(V(plus)-V(minus))/((fo*exp(2*L(V(r))))/L(V(r)))}