Unverified Commit 10c909dd authored by Zheng GONG's avatar Zheng GONG Committed by GitHub
Browse files

fix time unit for XTCFile (#4271)

parent 03ed8ff2
...@@ -12,7 +12,7 @@ from openmm.app.internal.xtc_utils import ( ...@@ -12,7 +12,7 @@ from openmm.app.internal.xtc_utils import (
import numpy as np import numpy as np
import os import os
from openmm import Vec3 from openmm import Vec3
from openmm.unit import nanometers, femtoseconds, is_quantity, norm from openmm.unit import nanometers, picoseconds, is_quantity, norm
import math import math
import tempfile import tempfile
import shutil import shutil
...@@ -51,7 +51,7 @@ class XTCFile(object): ...@@ -51,7 +51,7 @@ class XTCFile(object):
self._interval = interval self._interval = interval
self._modelCount = 0 self._modelCount = 0
if is_quantity(dt): if is_quantity(dt):
dt = dt.value_in_unit(femtoseconds) dt = dt.value_in_unit(picoseconds)
self._dt = dt self._dt = dt
if append: if append:
if not os.path.isfile(self._filename): if not os.path.isfile(self._filename):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment