Skip to content

Conversation

@GiggleLiu
Copy link
Collaborator

@GiggleLiu GiggleLiu commented Apr 5, 2025

Changes:

  • Set the default solver to SCIP for both linear and quadratic formulism.
  • New type: IonType.
  • Rename summation to periodic_sum
  • Rename build_ion_list to ions_on_grid
  • Remove build_vector
  • Remove build_matrix
  • Rename build_quadratic_program to optimize_quadratic
  • Rename build_linear_program to optimize_linear

@GiggleLiu
Copy link
Collaborator Author

GiggleLiu commented Apr 5, 2025

@Br0kenSmi1e Why the radius of Ti so small?

SrTiO3-structure

Copy link
Collaborator Author

@GiggleLiu GiggleLiu left a comment

Choose a reason for hiding this comment

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

@Br0kenSmi1e I need your help to understand some parameters.

- `population_list::AbstractVector{Int}`: The number of atoms of each species.
- `interaction_matrix::AbstractMatrix{T}`: The interaction matrix.
- `optimizer`: The optimizer.
- `optimizer_options`: The options for the optimizer, e.g. `optimizer_options = Dict("NodefileSave" => 1)` for Gurobi.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is this NodefileSave for?

Copy link
Owner

Choose a reason for hiding this comment

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

elseif Set([ion_a.species, ion_b.species]) == Set([:Ti, :O])
return 4590.7279, 0.261, 0.0
else
# TODO: maybe throw an error here?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it better to throw an error? Is there a better way to handle this?

Copy link
Owner

Choose a reason for hiding this comment

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

If the ion pair does not belong to any of the listed pairs, the would be no Buckingham interaction.
e.g., there is no Buckingham interaction between Sr ion and Ti ion.
So I think it works pretty well for now.

Copy link
Collaborator Author

@GiggleLiu GiggleLiu Apr 6, 2025

Choose a reason for hiding this comment

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

I do not think the unlisted atoms do not have Buckingham interaction

image

Copy link
Collaborator Author

@GiggleLiu GiggleLiu Apr 6, 2025

Choose a reason for hiding this comment

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

I think the key is: In programming, we should avoid propagating the contextual information to local scopes. It seems a very unit-level function knows it will be used for computing SrTiO in the future. This is too bad. It should be well defined on its own.

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, you are right. It should throw an error when receiving ion pairs other than Sr, Ti, O.

"""
struct Lattice{D, T, L}
vectors::SMatrix{D, D, T, L}
# Q: why pbc is not used?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pbc is not used here, why?

Copy link
Owner

Choose a reason for hiding this comment

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

I was planning to use this method on 2D materials. A 2D lattice can be built by setting pbc = (true, true, false).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But you did not consider it when calculating the minimum_distance.

@Br0kenSmi1e
Copy link
Owner

@GiggleLiu The ionic radii of Ti given in the paper is 0.42 Ang.

@GiggleLiu
Copy link
Collaborator Author

GiggleLiu commented Apr 6, 2025

@GiggleLiu The ionic radii of Ti given in the paper is 0.42 Ang.

I see, so the ionic radii can be very different from the neutral radii, since it lost some electrons.

@Br0kenSmi1e Br0kenSmi1e merged commit dbf4f5e into main Apr 6, 2025
3 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.

3 participants