Ejemplo n.º 1
0
 def write_vel_xyz(self,self_md):
     if self.count_vel_xyz == self.freq_vel_xyz:
         self.count_vel_xyz = 0
         mol_tot = bind_molecule(self_md.mol,self_md.mol_mm) 
         mess = "No.{} Time: {} fs [bohr/tau]".format(self_md.count, self_md.elaptime * tau2fs) 
         with open(self.file_vel_xyz,'a') as f: 
             f.write(mol_tot.get_velocities_formated(unit="bohr/tau",label=False,message=mess))   
     else: self.count_vel_xyz += 1 
Ejemplo n.º 2
0
 def write_xyz(self,self_tsh):
     if self.count_xyz == self.freq_xyz:
         self.count_xyz = 0
         mol_tot = bind_molecule(self_tsh.mol,self_tsh.mol_mm) 
         mess = "No.{} Time: {} fs [ang]".format(self_tsh.count, self_tsh.elaptime * tau2fs) 
         with open(self.file_xyz,'a') as f: 
             f.write(mol_tot.get_positions_formated(unit="ang",label=False,message=mess))   
     else: self.count_xyz += 1 
Ejemplo n.º 3
0
 def write_xyz(self,self_mc):
     if self.count_xyz == self.freq_xyz:
         self.count_xyz = 0
         mol_tot = bind_molecule(self_mc.mol_qm,self_mc.mol) 
         mess = "No.{}".format(self_mc.count) 
         with open(self.file_xyz,'a') as f: 
             f.write(mol_tot.get_positions_formated(unit="ang",label=False,message=mess))   
     else: self.count_xyz += 1 
Ejemplo n.º 4
0
 def write_xyz(self, self_mc):
     if self.count_xyz == self.freq_xyz:
         self.count_xyz = 0
         mol_tot = bind_molecule(self_mc.mol_qm, self_mc.mol)
         mess = "No.{}".format(self_mc.count)
         with open(self.file_xyz, 'a') as f:
             f.write(
                 mol_tot.get_positions_formated(unit="ang",
                                                label=False,
                                                message=mess))
     else:
         self.count_xyz += 1
Ejemplo n.º 5
0
 def write_xyz(self, self_tsh):
     if self.count_xyz == self.freq_xyz:
         self.count_xyz = 0
         mol_tot = bind_molecule(self_tsh.mol, self_tsh.mol_mm)
         mess = "No.{} Time: {} fs [ang]".format(self_tsh.count,
                                                 self_tsh.elaptime * tau2fs)
         with open(self.file_xyz, 'a') as f:
             f.write(
                 mol_tot.get_positions_formated(unit="ang",
                                                label=False,
                                                message=mess))
     else:
         self.count_xyz += 1
Ejemplo n.º 6
0
 def write_vel_xyz(self, self_md):
     if self.count_vel_xyz == self.freq_vel_xyz:
         self.count_vel_xyz = 0
         mol_tot = bind_molecule(self_md.mol, self_md.mol_mm)
         mess = "No.{} Time: {} fs [bohr/tau]".format(
             self_md.count, self_md.elaptime * tau2fs)
         with open(self.file_vel_xyz, 'a') as f:
             f.write(
                 mol_tot.get_velocities_formated(unit="bohr/tau",
                                                 label=False,
                                                 message=mess))
     else:
         self.count_vel_xyz += 1
Ejemplo n.º 7
0
from IO_MOLPRO import molpro_input_parser
from MakeInitial import SetLattice, SetMaxwell, superpositioned_atoms_delete 
from Potential import  Potential_MM 
from MonteCarlo import MonteCarlo, MonteCarlo_Ex 
import numpy as np 
import sys 

mol_qm, inp = molpro_input_parser("template.com") 
mol_qm.read_coord_from_file("coord1") 

n = 500 
lattice = SetLattice("Ar",n,1.77)
vlength = lattice.get_lattice_length() 
mol_mm = lattice.get_molecule() 
mol_mm = superpositioned_atoms_delete(mol_mm, mol_qm)
mol_tot = bind_molecule(mol_qm,mol_mm) 
pot_tot = Potential_MM(mol_tot, check_pbc=True, vlength=vlength) 
#print mol_tot.get_positions_formated() 
#print mol_tot.get_atomnames()  
#sys.exit() 
print len(mol_tot) 

delta = [0.2] * (len(mol_tot))  
#mc = MonteCarlo(mol_tot, pot_tot, delta, 1000000, 30.0, restart=False, frozen_atom_number = [0,1,2,3,4])  
mc = MonteCarlo_Ex(mol_tot, pot_tot, delta, 1000000, 30.0, restart=False, treated_as_molecule = [0,1,2,3,4], delta_mol = [0.02,0.02])  
#mc = MonteCarlo_Ex(mol_tot, pot_tot, delta, 100000, 30.0, restart=False,frozen_atom_number = [0,1,2,3,4])  
mc.access_writeoutput().set_freq_xyz(1000)
mc.access_writeoutput().set_freq_trajectory(1000) 
mc.access_writeoutput().set_freq_energy(1000) 
mc.run() 
Ejemplo n.º 8
0
from IO_MOLPRO import molpro_input_parser
from MakeInitial import SetLattice, SetMaxwell, superpositioned_atoms_delete
from Potential import Potential_MM
from MonteCarlo import MonteCarlo, MonteCarlo_Ex
import numpy as np
import sys

mol_qm, inp = molpro_input_parser("template.com")
mol_qm.read_coord_from_file("coord1")

n = 500
lattice = SetLattice("Ar", n, 1.77)
vlength = lattice.get_lattice_length()
mol_mm = lattice.get_molecule()
mol_mm = superpositioned_atoms_delete(mol_mm, mol_qm)
mol_tot = bind_molecule(mol_qm, mol_mm)
pot_tot = Potential_MM(mol_tot, check_pbc=True, vlength=vlength)
#print mol_tot.get_positions_formated()
#print mol_tot.get_atomnames()
#sys.exit()
print len(mol_tot)

delta = [0.2] * (len(mol_tot))
#mc = MonteCarlo(mol_tot, pot_tot, delta, 1000000, 30.0, restart=False, frozen_atom_number = [0,1,2,3,4])
mc = MonteCarlo_Ex(mol_tot,
                   pot_tot,
                   delta,
                   1000000,
                   30.0,
                   restart=False,
                   treated_as_molecule=[0, 1, 2, 3, 4],