Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for "Excepted" error in phonons calculations (Issue 71) #72

Merged
merged 5 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions aiida_crystal_dft/parsers/cry_pycrystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,18 @@ def parse_out_wavefunction(self, f):
return DataFactory('singlefile')(file=f)

def parse_out_trajectory(self, _):
ase_structs = self.stdout_parser.get_trajectory()
if not ase_structs:
return None
structs = [DataFactory('structure')(ase=struct) for struct in ase_structs]
traj = DataFactory('array.trajectory')()
traj.set_structurelist(structs)
return traj
try:
ase_structs = self.stdout_parser.get_trajectory()
if not ase_structs:
return None
structs = [DataFactory('structure')(ase=struct) for struct in ase_structs]
traj = DataFactory('array.trajectory')()
traj.set_structurelist(structs)
return traj
except ValueError as exc:
# fix for SCELPHONO keyword, since a supercell has more atoms than a regular cell
bz_points = self.stdout_parser.info['phonons'].get(['modes'], {})
if bz_points and len(bz_points) > 1:
return None
else:
raise exc
Loading