Skip to content

Commit

Permalink
BugFix: generate species.mol_list when running form an input file
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Mar 7, 2019
1 parent 0dcb451 commit fff78a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arc/species/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,9 @@ def from_dict(self, species_dict):
elif smiles is not None:
self.mol = Molecule(SMILES=smiles)
if self.mol is None and not self.is_ts:
if self.final_xyz:
_, self.mol = molecules_from_xyz(self.final_xyz)
elif self.initial_xyz is not None:
_, self.mol = molecules_from_xyz(self.initial_xyz)
xyz = self.final_xyz or self.initial_xyz
if xyz:
_, self.mol = molecules_from_xyz(xyz)
if self.mol is not None:
if self.final_xyz:
self.mol_from_xyz(self.final_xyz)
Expand All @@ -403,6 +402,9 @@ def from_dict(self, species_dict):
if self.bond_corrections:
self.long_thermo_description += 'Bond corrections: {0}\n'.format(self.bond_corrections)
self.number_of_atoms = len(self.mol.atoms)
self.multiplicity = self.mol.multiplicity
self.charge = self.mol.getNetCharge()
self.mol_list = self.mol.generate_resonance_structures(keep_isomorphic=False, filter_structures=True)
if self.mol is None and self.initial_xyz is None and not self.final_xyz:
raise SpeciesError('Must have either mol or xyz for species {0}'.format(self.label))
if self.initial_xyz is not None and not self.final_xyz:
Expand Down

0 comments on commit fff78a4

Please sign in to comment.