Skip to content

Conversation

@josemduarte
Copy link
Contributor

With this the default AsaCalculator constructor will use model 1 only. Also introduced a new constructor to choose the model.

…use model 1 by default. Added new constructor to choose model.
Copy link
Member

@sbittrich sbittrich left a comment

Choose a reason for hiding this comment

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

Looks good. Suggest to remove the duplicated code though.

*/
public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms) {
this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms);
this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms, 1);
Copy link
Member

Choose a reason for hiding this comment

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

Delegating to the new constructor makes this easier to maintain.

Suggested change
this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms, 1);
this(structure, probe, nSpherePoints, nThreads, hetAtoms, 1);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, thanks. Now pushed

@josemduarte josemduarte merged commit e0e7904 into biojava:master Feb 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants