Skip to content

Commit

Permalink
fix: disable fragment and atom_pref as default (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Oct 17, 2019
1 parent 8d66d0c commit d445f79
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mddatasetbuilder/datasetbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__author__ = "Jinzhe Zeng"
__email__ = "jzzeng@stu.ecnu.edu.cn"
__update__ = '2019-07-11'
__update__ = '2019-10-17'
__date__ = '2018-07-18'

import argparse
Expand Down Expand Up @@ -44,8 +44,8 @@ def __init__(
clusteratom=None, bondfilename=None,
dumpfilename="dump.reaxc", dataset_name="md", cutoff=5,
stepinterval=1, n_clusters=10000, n_each=1,
qmkeywords="%nproc=4\n#force mn15/6-31g(d,p) force", nproc=None, pbc=True,
fragment=True, errorfilename=None, errorlimit=0.):
qmkeywords="%nproc=4\n#force mn15/6-31g(d,p)", nproc=None, pbc=True,
fragment=False, errorfilename=None, errorlimit=0., atom_pref=False):
"""Init the builder."""
print(__doc__)
print(f"Author:{__author__} Email:{__email__}")
Expand Down Expand Up @@ -77,6 +77,7 @@ def __init__(
self._nstructure = 0
self.bondtyperestore = {}
self.errorfilename = errorfilename
self.atom_pref = atom_pref

def builddataset(self, writegjf=True):
"""Build a dataset."""
Expand Down Expand Up @@ -347,6 +348,7 @@ def _writestepxyzfile(self, item):
self.gjfdir, folder,
f'{self.xyzfilename}_{trajatomfilename}_{atomtypenum}.gjf'),
takenatomidindex, cutoffatoms)
if self.atom_pref:
np.save(os.path.join(
self.gjfdir, folder,
f'{self.xyzfilename}_{trajatomfilename}_{atomtypenum}.atom_pref.npy'),
Expand Down

0 comments on commit d445f79

Please sign in to comment.