tummfm / difftre

Learning neural network potentials from experimental data via Differentiable Trajectory Reweighting
Apache License 2.0
28 stars 9 forks source link

The tutorial CG_water is not loading the file O_O_RDF.csv #4

Closed andresilvapimentel closed 1 year ago

andresilvapimentel commented 1 year ago

reference_rdf = np.loadtxt('/content/O_O_RDF.csv')

It gives the following error:

ValueError Traceback (most recent call last) in 4 # O-O RDF 5 rdf_bin_centers, rdf_bin_boundaries, sigma_RDF = rdf_discretization(RDF_cut=1.0) # cut RDF at 1nm ----> 6 reference_rdf = np.loadtxt('/content/O_O_RDF.csv') 7 #reference_rdf = pd.read_csv('/content/O_O_RDF.csv') 8 rdf_spline = sci_interpolate.interp1d(reference_rdf[:, 0], reference_rdf[:, 1], kind='cubic')

3 frames /usr/local/lib/python3.8/dist-packages/numpy/lib/npyio.py in floatconv(x) 734 if '0x' in x: 735 return float.fromhex(x) --> 736 return float(x) 737 738 typ = dtype.type

ValueError: could not convert string to float: '<!DOCTYPE'

S-Thaler commented 1 year ago

The error says that there is a string "<!DOCTYPE" within the file O_O_RDF.csv. I rechecked the original O_O_RDF.csv file and it is loading as expected, no string "<!DOCTYPE" to be found. Is it possible that the file was somehow corrupted when copying it to Colab?

Possibly an HTML header was added to the file? https://www.w3schools.com/tags/tag_doctype.asp

Could such a corruption also be the reason why loading the .pdb file in issue #3 fails?