ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

AttributeError on fetching distance from a LowerUpperBoundDistanceRestraint object #58

Closed saijananiganesan closed 3 years ago

saijananiganesan commented 3 years ago

Calling distance on a LowerUpperBoundDistanceRestraint object produces an attribute error: "AttributeError: 'LowerUpperBoundDistanceRestraint' object has no attribute 'distance' ", not sure if I am doing something wrong. Exact command: i.distance, where i is the restraint object (<ihm.restraint.LowerUpperBoundDistanceRestraint object at 0x7f8d58d78310>).

benmwebb commented 3 years ago

DistanceRestraint doesn't have a distance member; instead it has distance_lower_limit and distance_upper_limit (which may both be the same, or None if a given limit is not applicable). I notice these aren't documented though; I'll correct that.