SimonEnsemble / PorousMaterials.jl

Julia package towards classical molecular modeling of nanoporous materials
GNU General Public License v3.0
51 stars 11 forks source link

Using `length` on framework.charges and molecule.charges #79

Closed Andrew-S-Rosen closed 5 years ago

Andrew-S-Rosen commented 5 years ago

In line 172 of Grid.jl, there is the following statement:

charged_system = (length(framework.charges) > 1) && (length(molecule.charges) > 1)

I receive the error below regarding the use of length on framework.charges or molecule.charges:

ERROR: MethodError: no method matching length(::Charges)
Closest candidates are:
  length(::Core.SimpleVector) at essentials.jl:571
  length(::Base.MethodList) at reflection.jl:728
  length(::Core.MethodTable) at reflection.jl:802
  ...
Stacktrace:
 [1] top-level scope at none:0

Should line 172 not be the following instead? Using the updated line results in the successful generation of energy grids:

charged_system = (framework.charges.n_charges > 1) && (molecule.charges.n_charges > 1)
SimonEnsemble commented 5 years ago

yes! this change is coming soon in this PR. sorry about that.

Andrew-S-Rosen commented 5 years ago

Ah, noted! Not a problem. Feel free to close this if you'd like.

SimonEnsemble commented 5 years ago

@arosen93 fixed in master!

so you can: add PorousMaterials#master once in the package environment (type ] in the Julia REPL). See here.