schrodinger.test.canvas_utils module¶
Container for common test functions used in Canvas tests
- schrodinger.test.canvas_utils.read_pw(filename)[source]¶
Read a canvasMCS pw formatted file. (pw stands for pair-wise).
- schrodinger.test.canvas_utils.run_mcs_pw(inputfile, atom_typing=97)[source]¶
Run canvasMCS -atomtype 97 on
inputfile
, produces pairwise output.
- schrodinger.test.canvas_utils.run_mcs(cmd)[source]¶
Run a command and check return code and that the phrase “successfully completed” is printed.
- Returns
stdout from the canvasMCS job.
- schrodinger.test.canvas_utils.get_map(list1, list2)[source]¶
Get a map of elements in list1 to elements in list2. Fails if the mapping is not one to one. list1 and list2 are strings of comma separated integers.
- schrodinger.test.canvas_utils.assertAtomMapsEqual(left_map, left_filename, right_map, right_filename)[source]¶
Check that two dicts representing atom mappings are equal. Functionally equivalent to assertEqual(left_map, right_map), but more precise error reporting.
- schrodinger.test.canvas_utils.assertCSVFilesMatch(test_file, reference_file)[source]¶
This function considers only the first two records in each file and checks that the pairwise atom mappings are consistent with the reference
The current fields in a MCS csv file are:
SMILES Name i_canvas_MCS_Match_Count i_canvas_MCS_Size i_canvas_MCS_Group i_canvas_MCS_Atom_Count i_canvas_MCS_Bond_Count s_canvas_MCS_Atom_List s_canvas_MCS_Bond_List s_canvas_MCS_SMARTS
This checks that the SMILES, s_canvas_MCS_Atom_List and fields match. Uses assertAtomMapsEqual to check that the mapping is the same on the LHS and the RHS.