Skip to content

Commit c806a0a

Browse files
committed
support read and dump multiframes for .gro file
1 parent 2d2d43d commit c806a0a

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

dpdata/system.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import dpdata.siesta.output
1616
import dpdata.siesta.aiMD_output
1717
import dpdata.md.pbc
18-
import dpdata.gaussian.gjf
1918
import dpdata.gaussian.log
2019
import dpdata.amber.md
2120
import dpdata.cp2k.output
@@ -738,37 +737,7 @@ def to_pwmat_atomconfig(self, file_name, frame_idx = 0) :
738737
w_str = dpdata.pwmat.atomconfig.from_system_data(self.data, frame_idx)
739738
with open(file_name, 'w') as fp:
740739
fp.write(w_str)
741-
742-
@register_to_funcs.register_funcs("gaussian/gjf")
743-
def to_gaussian_gjf(self, gjf_file=None, frame_idx=0, header="", title="", foot="", charge=0, mult=1):
744-
"""
745-
Write input file for Gaussian. Please refer to https://gaussian.com/input/?tabid=2 for more information on syntax of Gaussian input files.
746740

747-
Parameters
748-
----------
749-
gjf_file : str or None
750-
The file to write. If None, return the file's content as a string
751-
frame_idx : int
752-
The index of frame to specify molecule geometry
753-
header : str
754-
The route section (# lines) and link-0 commands (% commands)
755-
title : str
756-
The title section of .gjf files
757-
foot : str
758-
The modifications to coordinates, used when Opt=ModRedundant
759-
charge : int
760-
The charge of the system
761-
mult : int
762-
The multiplicity of the system
763-
"""
764-
assert frame_idx < self.get_nframes()
765-
ret = dpdata.gaussian.gjf.to_gjf_string(self, frame_idx, header, title, foot, charge, mult)
766-
767-
if gjf_file is None:
768-
return ret
769-
else:
770-
with open(gjf_file, 'w+') as f:
771-
f.write(ret)
772741

773742
def affine_map(self, trans, f_idx = 0) :
774743
assert(np.linalg.det(trans) != 0)

0 commit comments

Comments
 (0)