Xtb contribution#711
Conversation
pmrv
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I've left some nits below, but looks generally good.
| def from_hdf(self, hdf=None, group_name=None): | ||
| super(FitsnapJob, self).from_hdf(hdf=hdf, group_name=group_name) | ||
| super(FitsnapJob, self).from_hdf(hdf=hdf, group_name=group_name) No newline at end of file |
There was a problem hiding this comment.
I didn't see this in the original PR, but this shouldn't be necessary if you're just calling super() anyway. Is there something weird going on, that made it necessary? If so we should look closer to the source.
| from xtb.ase.calculator import XTB | ||
|
|
||
| @contextlib.contextmanager | ||
| def make_temp_directory(prefix=None): |
| outstring = '{}\n\n'.format(len(ase_atoms)) | ||
| for atom in ase_atoms: | ||
| outstring += '{} {} {} {}\n'.format(atom.symbol, | ||
| atom.position[0], | ||
| atom.position[1], | ||
| atom.position[2]) | ||
| outstring = outstring.strip('\n') | ||
| return outstring |
There was a problem hiding this comment.
Using StringIO and ase_atoms.write() should work as well, or are you specifically trying to surpress the cell dimensions in the output?
| if (self['output'] is not None) and ('xtb' in self['output'].list_groups()) and \ | ||
| (self.resultsdf.shape[0] == 0): | ||
| self.resultsdf = pd.read_hdf(self.project_hdf5.file_name, | ||
| key=self.job_name+'/output/xtb') No newline at end of file |
There was a problem hiding this comment.
I think writing/reading dataframes directly to hdf should work, but disregard if you've tried that.
| ase_atoms.get_total_energy() | ||
| except: | ||
| pass | ||
| if len(ase_atoms.calc.results) > 0: |
There was a problem hiding this comment.
Should set the job.status.aborted in the else clause.
Added xTB calculator.