Skip to content

[Bug]: Inconsistent Return Types in RelaxCalc #63

@atulcthakur

Description

@atulcthakur

Email (Optional)

No response

Version

v0.3.2

Which OS(es) are you using?

  • MacOS
  • Windows
  • Linux

What happened?

RelaxCalc currently return inconsistent types.
For instance, if the input type is of Structure then both Single Point and Relaxation calculation return Structure. However, if the input type is of Slab then Relaxation calculation returns Structure, but Single Point energy calculation returns Slab.
A simple instance where this comes up is when type checking with mypy, but it could potentially be problematic in other cases.

Solution:

Either consistently return aStructure or cast to the original type. The latter would be more beneficial as Slab often has more information for example, but either is fine.

Code snippet

Log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrelaxRelaxCalc related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions