moorhen-coot / Moorhen

A JavaScript molecular graphics program
https://moorhen.org
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Read dictionary and get_residue_names_with_no_dictionary not working currently #434

Closed FilomenoSanchez closed 6 days ago

FilomenoSanchez commented 2 weeks ago

It seems there is an issue when reading dictionaries:

    test.only("Test get_residue_names_with_no_dictionary", () => {
        const coordMolNo_1 = molecules_container.read_pdb('./5fjj.pdb')
        molecules_container.get_residue_names_with_no_dictionary(coordMolNo_1)
        // NAG is printed among others...

        // Dictionary downloaded from github monomer library
        const fileContents_NAG = fs.readFileSync(path.join(__dirname, '..', 'test_data', 'NAG.cif'), { encoding: 'utf8', flag: 'r' })
        molecules_container.read_dictionary_string(fileContents_NAG, coordMolNo_1)

        molecules_container.get_residue_names_with_no_dictionary(coordMolNo_1)
        // Bug -> NAG is printed again, despite having just read the dictionary...
    })

This prevents some functionalities from working correctly, mainly contact dots. However other functions work despite this issue (refinement, and ligand SVGs). This only occurs when assignment of the dictionary is done to a specific molecule, if done to "any" molecule then things seem to work OK.

FilomenoSanchez commented 6 days ago

This was fixed in https://github.com/pemsley/coot/commit/f8a6cef19e5dd82bc9cd79230501b6cbca8d0eff