Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoleculePairPotential has problem with identical atoms #3

Open
tjjarvinen opened this issue Feb 20, 2019 · 0 comments
Open

MoleculePairPotential has problem with identical atoms #3

tjjarvinen opened this issue Feb 20, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@tjjarvinen
Copy link
Collaborator

When creating MoleculPairPotential information of identical atoms is lost.

using PotentialFitting
using PotentialCalculation

m1 = MoleculeIdenticalInformation{AtomOnlySymbol}(["A","A","B","C","D"])
m2 =  MoleculeIdenticalInformation{AtomOnlySymbol}(["E"])
push!(m1.identical,(1,2))

mpp = MoleculePairPotential(m1,m2, LJ)

Produces

julia> mpp.mol1.identical
Identical(Set[Set([1]), Set([2]), Set([3]), Set([4]), Set([5])])

julia> m1.identical
Identical(Set[Set([2, 1]), Set([3]), Set([4]), Set([5])])

Issue seems to stem from MoleculePairPotential.mol1 having defined type. When there is no type definition everythin works as intended.

A hack around this was implemented in 7f259e7 but a better way needs to be done.

ps. This might be a issue in Julia itself and would be good idea to explore this more.

@tjjarvinen tjjarvinen added the bug Something isn't working label Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant