Révision 16 ase/calculators/qmx.py

qmx.py (revision 16)
30 30
        self.print_forces = print_forces
31 31

  
32 32
    def get_energy_subsystem(self, path, calculator, atoms, force_consistent):
33
        # writing output
34
        line = "running energy in: " + path + "\n"
35
        sys.stderr.write(line)
33 36
        # go to directory and calculate energies
34
        print "running energy in: ", path
35 37
        os.chdir(path)
36 38
        atoms.set_calculator(calculator)
37 39
        energy = atoms.get_potential_energy()
40
        # return path and result
38 41
        os.chdir("..")
39 42
        return energy
40 43

  
41 44
    def get_forces_subsystem(self, path, calculator, atoms):
45
        # writing output
46
        line = "running forces in: " + path + "\n"
47
        sys.stderr.write(line)
42 48
        # go to directory and calculate forces
43
        print "running forces in: ", path
44 49
        os.chdir(path)
45 50
        atoms.set_calculator(calculator)
46 51
        forces = atoms.get_forces()
52
        # return path and result
47 53
        os.chdir("..")
48 54
        return forces
49 55

  
......
55 61
        # calculate energies
56 62
        energy = e_sys_lo - e_cl_lo + e_cl_hi
57 63
        # print energies
58
        print "%20s = %15s - %15s + %15s" %("E(C:S)", "E(S-MM)", "E(C-MM)", "E(C-QM)")
64
        print "%20s = %15s - %15s + %15s" %("E(C:S)", "E(S,LL)", "E(C,LL)", "E(C,HL)")
59 65
        print "%20f = %15f - %15f + %15f" %(energy, e_sys_lo, e_cl_lo, e_cl_hi)
60 66
        # set energies and return
61 67
        if force_consistent:
......
145 151
            print
146 152
        
147 153
        return f_sys_lo
154

  
155
    def get_stress(self, atoms):
156
    	return None

Formats disponibles : Unified diff