Ignore:
Timestamp:
Jan 24, 2024, 12:09:57 AM (21 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
5a479d
Parents:
6dde30
git-author:
Frederik Heber <frederik.heber@…> (01/24/24 00:09:17)
git-committer:
Frederik Heber <frederik.heber@…> (01/24/24 00:09:57)
Message:

Python3: Test/Python changed.

  • print -> print()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Python/ForceAnnealing/pre/ising_model_chain.py

    r6dde30 rd083cc  
    88
    99if len(sys.argv) < 5:
    10         print 'Usage: '+sys.argv[0]+' <input> <path> <steps> <no_atoms> <use bondgraph>'
     10        print('Usage: '+sys.argv[0]+' <input> <path> <steps> <no_atoms> <use bondgraph>')
    1111        sys.exit(1)
    1212
     
    2121# creating input file
    2222atomstart=7.6-1.6*math.floor(no_atoms/2)
    23 print "Creating "+inputfile
     23print("Creating "+inputfile)
    2424with open(inputfile, 'w') as f:
    2525        f.write("# ATOMDATA\ttype\tId\tx=3\tu=3\tF=3\tneighbors=4\n")
     
    3636                        f.write("C\t%d\t%lg\t10\t10\t0\t0\t0\t0\t0\t0\t%d\t%d\t0\t0\n" % (i, atompos, i-1, i+1));
    3737
    38 print "Parsing from "+inputfile
     38print("Parsing from "+inputfile)
    3939mol.WorldInput(inputfile)
    4040mol.SelectionAllAtoms()
     
    5353        print("Roots of p "+str(p)+" are "+str(zeros))
    5454        damping=numpy.real(zeros[-1])
    55         print "Using damping factor of "+str(damping)
     55        print("Using damping factor of "+str(damping))
    5656else:
    5757        if no_atoms == 2:
     
    8282                                        continue
    8383                                line=line.replace('\t',' ')
    84                                 print "LINE: "+line
     84                                print("LINE: "+line)
    8585                                [elementtype, X, Y, Z] = line.split(' ', 4)
    8686                                if coords!=[0.,0.,0.]:
     
    8888                                coords=[float(X),float(Y),float(Z)]
    8989        except IOError:
    90                 print 'Warning: '+outputfile+' not readable.'
     90                print('Warning: '+outputfile+' not readable.')
    9191                sys.exit(1)
    9292       
Note: See TracChangeset for help on using the changeset viewer.