Adde temperature for BI as a command-line argument
This commit is contained in:
@ -19,7 +19,7 @@ from scipy.optimize import curve_fit
|
|||||||
|
|
||||||
|
|
||||||
class BI(PairTabulate):
|
class BI(PairTabulate):
|
||||||
def __init__(self, units=None, comment=None, T=1):
|
def __init__(self, units=None, comment=None):
|
||||||
super(PairTabulate, self).__init__("pair", self.energy, units, comment)
|
super(PairTabulate, self).__init__("pair", self.energy, units, comment)
|
||||||
self.parser.add_argument(
|
self.parser.add_argument(
|
||||||
"--eshift",
|
"--eshift",
|
||||||
@ -32,11 +32,19 @@ class BI(PairTabulate):
|
|||||||
self.parser.add_argument(
|
self.parser.add_argument(
|
||||||
"--rdffile", default="rdf.dat", help="Rdf file to be read."
|
"--rdffile", default="rdf.dat", help="Rdf file to be read."
|
||||||
)
|
)
|
||||||
|
self.parser.add_argument(
|
||||||
|
"--temperature", default=0, help="Temperature for BI."
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
self.args = self.parser.parse_args()
|
self.args = self.parser.parse_args()
|
||||||
except argparse.ArgumentError:
|
except argparse.ArgumentError:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
if self.args.temperature > 0:
|
||||||
|
T = self.args.temperature
|
||||||
|
else:
|
||||||
|
sys.exit("Invalid temperature provided.")
|
||||||
|
|
||||||
kb = 1
|
kb = 1
|
||||||
# Add more kb units if you need
|
# Add more kb units if you need
|
||||||
if units == "si":
|
if units == "si":
|
||||||
|
|||||||
Reference in New Issue
Block a user