Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Xtb contribution#711

Open
mgt16-LANL wants to merge 11 commits into
pyiron:mainfrom
mgt16-LANL:xtb_contribution
Open

Xtb contribution#711
mgt16-LANL wants to merge 11 commits into
pyiron:mainfrom
mgt16-LANL:xtb_contribution

Conversation

@mgt16-LANL

Copy link
Copy Markdown

Added xTB calculator.

@github-actions

github-actions Bot commented Jun 9, 2023

Copy link
Copy Markdown
Contributor

Binder 👈 Launch a binder notebook on branch mgt16-LANL/pyiron_contrib/xtb_contribution

@mgt16-LANL mgt16-LANL requested a review from jan-janssen June 9, 2023 18:59

@pmrv pmrv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I've left some nits below, but looks generally good.

Comment on lines 100 to +101
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not use TemporyDirectory?

Comment on lines +54 to +61
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using StringIO and ase_atoms.write() should work as well, or are you specifically trying to surpress the cell dimensions in the output?

Comment on lines +146 to +149
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should set the job.status.aborted in the else clause.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants