Profile
- Name
- BUNS Detector
- ID
- 105586
- Shared with
- Public
- Parent
- None
- Children
- None
- Created on
- January 15, 2022 at 19:25 PM UTC
- Updated on
- January 15, 2022 at 19:25 PM UTC
- Description
A simple recipe to print more information on BUNS using the new filter.GetData("Buried Unsats")
Best for
Code
-- A simple recipe to report BUNS
-- Author: joshmiller
-- Notes: For symmetry puzzles, will report symmetrically more BUNS; e.g. tetrameter symmetry with 4 BUNS in puzzle objective will report all 16 symmetric copies of the 4 BUNS
buns = filter.GetData ( "Buried Unsats" )
print ( #buns["acceptors"] + #buns["donors"] .. " buried unsats found" )
print("Filter version " .. buns["version"])
for index,value in pairs(buns["acceptors"]) do
local res = 0
for ind, val in pairs(value) do
if ind == 1 then
res = val
else
print("Acceptor buried at res " .. res .. ", atom " .. val)
end
end
end
for index,value in pairs(buns["acceptors"]) do
local res = 0
for ind, val in pairs(value) do
if ind == 1 then
res = val
else
print("Donor buried at res " .. res .. ", atom " .. val)
end
end
end