def test_selected_atoms_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.selected_atoms = ["H"] expected_settings = Settings({ 'selected_atoms': ['H'], 'specific': { 'adf': { 'constraints': { 'atom 1': '', 'atom 2': '' }, 'geometry': { 'optim': 'cartesian' } } } }) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.selected_atoms = [3, 4, 5, 6] expected_settings = Settings({ 'selected_atoms': [3, 4, 5, 6], 'specific': { 'adf': { 'constraints': { 'atom 1': '', 'atom 2': '' }, 'geometry': { 'optim': 'cartesian' } } } }) assert str(adf.generic2specific(s, mol)) == str(expected_settings)
def test_freeze_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.freeze = ["C", "O"] expected_settings = Settings({ 'freeze': ["C", "O"], 'specific': { 'adf': { 'constraints': { 'atom 1': '', 'atom 2': '' }, 'geometry': { 'optim': 'cartesian' } } } }) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.freeze = [1, 2] expected_settings = Settings({ 'freeze': [1, 2], 'specific': { 'adf': { 'constraints': { 'atom 1': '', 'atom 2': '' }, 'geometry': { 'optim': 'cartesian' } } } }) assert str(adf.generic2specific(s, mol)) == str(expected_settings)
def test_freeze_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.freeze = ["C", "O"] expected_settings = Settings({'freeze': ["C", "O"], 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.freeze = [1, 2] expected_settings = Settings({'freeze': [1, 2], 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings)
def test_freeze_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.freeze = ["C", "O"] expected_settings = Settings( {'freeze': ["C", "O"], 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.freeze = [1, 2] expected_settings = Settings( {'freeze': [1, 2], 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings)
def test_freeze_with_adf(): """Test the freeze keyword with ADF.""" mol = molkit.from_smiles('CO') s = Settings() s.freeze = ["C", "O"] expected_settings = Settings( {'freeze': ["C", "O"], 'specific': adf_const}) assertion.eq(str(adf.generic2specific(s, mol)), str(expected_settings)) s.freeze = [1, 2] expected_settings = Settings( {'freeze': [1, 2], 'specific': adf_const}) assertion.eq(str(adf.generic2specific(s, mol)), str(expected_settings))
def test_selected_atoms_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.selected_atoms = ["H"] expected_settings = Settings( {'selected_atoms': ['H'], 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.selected_atoms = indices expected_settings = Settings( {'selected_atoms': indices, 'specific': adf_const}) assert str(adf.generic2specific(s, mol)) == str(expected_settings)
def test_selected_atoms_with_adf(): """Test the ADF atoms selection features.""" mol = molkit.from_smiles('CO') s = Settings() s.selected_atoms = ["H"] expected_settings = Settings( {'selected_atoms': ['H'], 'specific': adf_const}) assertion.eq(str(adf.generic2specific(s, mol)), str(expected_settings)) s.selected_atoms = indices expected_settings = Settings( {'selected_atoms': indices, 'specific': adf_const}) assertion.eq(str(adf.generic2specific(s, mol)), str(expected_settings))
def test_selected_atoms_with_adf(): mol = molkit.from_smiles('CO') s = Settings() s.selected_atoms = ["H"] expected_settings = Settings({ 'selected_atoms': ['H'], 'specific': adf_const }) assert str(adf.generic2specific(s, mol)) == str(expected_settings) s.selected_atoms = indices expected_settings = Settings({ 'selected_atoms': indices, 'specific': adf_const }) assert str(adf.generic2specific(s, mol)) == str(expected_settings)