Add initial support for python bindings
[alexxy/gromacs.git] / scripts / make_gromos_rtp.py
index bb8ff3ab3542c5c209e2cc086a1cc22f0694b665..c672c2a2ac6675a334de6f2f06a01b577cf34860 100755 (executable)
@@ -122,9 +122,9 @@ class Cin:
        " Returns linenumber of string in list"
        for i in range(len(list)):
                 if list[i] == string:
-                   index = i
-       return index
-
+                   return i
+       print >> sys.stderr "Could not find string",string,"in list of length",len(list)
+       return -1
 
 #--------------------------#
 # unravel gromos list
@@ -253,7 +253,7 @@ for resnum in range(start,stop):    # loop through all residues
     f.getRESname(f.all[resnum])                # residue name
     f.getNATOM  (f.all[resnum])                # number of atoms
 
-    if f.nlin != 0:                    # 0 for a seperate molecule
+    if f.nlin != 0:                    # 0 for a separate molecule
           f.getEXCLUS(f.all[resnum])   # number of exclusions
 
     f.getATOM   (f.all[resnum])                # atoms                 => f.atoms