Closed Anshuman5 closed 6 years ago
We used nwchem calculator with ASE to generate trajectory files.
Dears, I am also interested in this topic. Could you guys show an example on how generate dimer and bulk trajectories? Regards, Socrates
If I understood you correctly, this sounds more like an ASE question. Hotbit is just a calculator on that ASE uses -- all trajectory-related stuff are ASE's concern.
Dear Socrates,
You can generate trajectory files by getting the vector(s) along the bond(s) you want to lengthen, scale these vectors, and then move the position of the relevant atom along this vector. Do this multiple times for however long you want to lengthen the bond. Then use ASE to create an "atom" object for each set of positions and do a DFT calculation. For example, for a dimer,
traj = Trajectory('dimer.traj','w',ch) #create Trajectory object
dx = 0.1 #scaling factor
list1=positions[0] #position of first atom
list2=[] #will store new position of second atom
vec_2 = np.array(positions[1]) - np.array(list1) #vector pointing from 1 to 2
norm_2 = np.linalg.norm(vec_2, ord=2) #get norm
vec_2 = [x/norm_2 for x in vec_2] #get unit vector
for i in range(6):
ss = [dx*x for x in vec_2] #scale vector
list2 = np.array(positions[1]) + np.array(ss) #move second atom
... #create ASE atom object and do DFT calculation (See ASE documentation)
traj.write(atom, energy = (dft_energy)) #write dft energy to trajectory file
dx += 0.1
...
Hope that helps!
-Sarah
Dear Sarah,
Thank you very much for help me with this matter.
Regards,
Socrates
Em 23/02/2018 19:53, Sarah escreveu:
Dear Socrates, You can generate trajectory files by getting the vector(s) along the bond(s) you want to lengthen, scale these vectors, and then move the position of the relevant atom along this vector. Do this multiple times for however long you want to lengthen the bond. Then use ASE to create an "atom" object for each set of positions and do a DFT calculation. For example, for a dimer, traj = Trajectory('dimer.traj','w',ch) #create Trajectory object dx = 0.1 #scaling factor list1=positions[0] #position of first atom list2=[] #will store new position of second atom vec_2 = np.array(positions[1]) - np.array(list1) #vector pointing from 1 to 2 norm_2 = np.linalg.norm(vec_2, ord=2) #get norm vec_2 = [x/norm_2 for x in vec_2] #get unit vector for i in range(6): ss = [dx*x for x in vec2] #scale vector list2 = np.array(positions[1]) + np.array(ss) #move second atom ... #create ASE atom object and do DFT calculation (See ASE documentation)_ traj.write(atom, energy = (dft_energy)) #write dft energy to trajectory file dx += 0.1 ... Hope that helps! -Sarah
-- You are receiving this because you commented. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
-- Dr. Sócrates de Oliveira Dantas Professor Titular Departamento de Física Instituto de Ciências Exatas Universidade Federal de Juiz de Fora CEP:36036-330 - Juiz de Fora - Minas Gerais - Brasil
[1] https://github.com/pekkosk/hotbit/issues/15#issuecomment-368161742 [2] https://github.com/notifications/unsubscribe-auth/AF_p8huUGE6UBmsQAhVzXVfqs6l4w4Xsks5tX0FOgaJpZM4QzJBA
Dear users,
I am exploring Hotbit and would like to know how the trajectory files are created. Which type of calculations are used in ASE to generate the trajectory file. I would be grateful if can share the script used to create the trajectory files in the CH_parameterization example available in the HOTBIT code.
Regards, Anshuman