You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello agin,
I've been looking at calculating partial charges for the atoms on the pdb. I do this in with an external QM package which generates a list of charges.
At the moment I am creating a new struct as not that sure how to update the charge field. It would be nice to have an example on how to update the charge field in Atom. Also if you knew of any good Julia ways of calculating partial charges, QM is a bit expensive on big systems.
julia>using PDBTools
julia> pdb =wget("1BSX", "protein");
julia> charges =rand(length(pdb));
julia>for (i, atom) inenumerate(pdb)
atom.custom[:charge] = charges[i]
end
julia> pdb[1].custom[:charge]
0.09441681249467149
julia>custom_field(pdb[1], :charge) # alternative getter function0.09441681249467149
julia>custom_field.(pdb, :charge) # broadcast to get all charges (with the dot syntax)3994-element Vector{Float64}:0.094416812494671490.17811534472805368⋮0.82540406399754420.6153943592336552
Concerning computing the charges, I don't know the details of your problem, but generally QM calculations are used to do so. It depends on your goals. Alternatives are using semi-empirical methods, or using classical force-fields.
You can get better advice in general, when the issue is not specific to this package, by asking on the Julia Discourse, or in the JuliaMolSim channel on slack or Zulip.
I'll add this partial charge assignment as an example in the docs. Thanks again for the feedback.
Hello agin,
I've been looking at calculating partial charges for the atoms on the pdb. I do this in with an external QM package which generates a list of charges.
At the moment I am creating a new struct as not that sure how to update the charge field. It would be nice to have an example on how to update the charge field in Atom. Also if you knew of any good Julia ways of calculating partial charges, QM is a bit expensive on big systems.
The text was updated successfully, but these errors were encountered: