I'm using POSCAR as input,when i calculate the energy,all the angles were
modified?after doing this the energy is far different from VASP result,why
correct the angles?
this is my input files:
Ti Zr
1.00000000000000
7.1138700427624730 0.0000000000000000 -0.0000000000000000
0.0000000000000000 7.1138700427624730 -0.0000000000000000
-0.0000000000000000 -0.0000000000000000 7.1138700427624730
Ti Zr
1 15
Direct
0.5000000000000000 0.5000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.2572095688752021 0.2572095688752021 0.2427904311247979
0.5000000000000000 -0.0000000000000000 -0.0000000000000000
0.0000000000000000 0.5000000000000000 0.0000000000000000
-0.0000000000000000 -0.0000000000000000 0.5000000000000000
0.7427904311247978 0.2572095688752021 0.2427904311247979
0.2572095688752021 0.7427904311247978 0.2427904311247979
0.2572095688752021 0.2572095688752021 0.7572095688752022
0.7427904311247978 0.7427904311247978 0.7572095688752022
0.2572095688752021 0.7427904311247978 0.7572095688752022
0.7427904311247978 0.2572095688752021 0.7572095688752022
0.7427904311247978 0.7427904311247978 0.2427904311247979
0.5000000000000000 0.5000000000000000 0.5000000000000000
-0.0000000000000000 0.5000000000000000 0.5000000000000000
0.5000000000000000 0.0000000000000000 0.5000000000000000
this is my code in python:
import openbabel as ob
try:
filename ="/home/mozzie/PycharmProjects/Ti.txt"
except:
print "Usage: python energy.py filename"
sys.exit(1)
# Read the file.
mol = ob.OBMol()
conv = ob.OBConversion()
format = conv.FormatFromExt(filename)
conv.SetInFormat('POSCAR')
conv.ReadFile(mol, filename)
ff = ob.OBForceField.FindForceField("UFF")
if ff == 0:
print "Could not find forcefield"
ff.SetLogLevel(ob.OBFF_LOGLVL_HIGH)
# python specific, python doesn't have std::ostream so the SetLogFile()
# function is replaced by SetLogToStdOut and SetLogToStdErr in the SWIG
# interface file
ff.SetLogToStdErr()
c=ob.OBFFConstraints()
# Setup the molecule. This assigns atoms types, charges and parameters
if ff.Setup(mol) == 0:
print "Could not setup forcefield"
# Calculate the energy
s=ff.Energy()
p=ff.GetCoordinates(mol)
ed=time.time()
print s
print p
this is part of logs
SETTING UP ANGLE CALCULATIONS...
CORRECTED COORDINATION FOR ANGLE 3-1-5 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 5-1-7 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 5-1-8 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 5-1-13 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 3-1-7 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 3-1-8 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 3-1-13 (IDX)... WAS 6 NOW 5
CORRECTED COORDINATION FOR ANGLE 7-1-8 (IDX)... WAS 6 NOW 5
--
View this message in context:
http://forums.openbabel.org/why-forcefielduff-correct-angles-when-calculate-energy-tp4659016.html
Sent from the General discussion mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss