Changes Versioning System for Better Publicly
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import pickle
|
||||
|
||||
from diceplayer.shared.interface.gaussian_interface import GaussianInterface
|
||||
from diceplayer.shared.interface.dice_interface import DiceInterface
|
||||
from diceplayer.shared.utils.dataclass_protocol import Dataclass
|
||||
@@ -16,6 +14,7 @@ from diceplayer import logger
|
||||
from dataclasses import fields
|
||||
from typing import Type, Tuple
|
||||
from pathlib import Path
|
||||
import pickle
|
||||
import yaml
|
||||
import sys
|
||||
import os
|
||||
|
||||
@@ -166,14 +166,11 @@ class DiceInterface(Interface):
|
||||
def _make_init_file(self, proc_dir: Path, last_xyz_file: TextIO):
|
||||
xyz_lines = last_xyz_file.readlines()
|
||||
|
||||
HEADER_LENGTH = 2
|
||||
MAIN_MOLECULE_LENGTH = len(self.system.molecule[0].atom)
|
||||
|
||||
SECONDARY_MOLECULES_LENGTH = HEADER_LENGTH + MAIN_MOLECULE_LENGTH
|
||||
SECONDARY_MOLECULE_LENGTH = 0
|
||||
for i in range(1, len(self.step.dice.nmol)):
|
||||
SECONDARY_MOLECULES_LENGTH += self.step.dice.nmol[i] * len(self.system.molecule[i].atom)
|
||||
SECONDARY_MOLECULE_LENGTH += self.step.dice.nmol[i] * len(self.system.molecule[i].atom)
|
||||
|
||||
xyz_lines = xyz_lines[HEADER_LENGTH + MAIN_MOLECULE_LENGTH: SECONDARY_MOLECULES_LENGTH]
|
||||
xyz_lines = xyz_lines[-SECONDARY_MOLECULE_LENGTH:]
|
||||
|
||||
input_file = Path(proc_dir, self.step.dice.outname + ".xy")
|
||||
with open(input_file, 'w') as f:
|
||||
|
||||
Reference in New Issue
Block a user