# # MoleCuilder - creates and alters molecular systems # Copyright (C) 2016 Frederik Heber # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ### saturate atoms with (partial) bonding AT_SETUP([Atoms - saturating water molecule]) AT_KEYWORDS([atoms saturate-atoms]) # this should not do anything as water is fully saturated file=saturated_water.pdb AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/Saturate/pre/water.pdb .], 0) AT_CHECK([chmod u+w water.pdb], 0) AT_CHECK([../../molecuilder --dry-run -i water.pdb --select-atom-by-element 8 --saturate-atoms --output-as $file --no-dry-run --store-session session-atoms-saturate-atoms-bonded_atoms.py --session-type python], 0, [ignore], [ignore]) AT_CHECK([grep -v "Command.*DryRun" session-atoms-saturate-atoms-bonded_atoms.py >session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([../../molecuilderguitest session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/saturated_water.pdb], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Atoms - saturating partial water molecule]) AT_KEYWORDS([atoms saturate-atoms]) file=saturated_water_H1.pdb AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/Saturate/pre/water.pdb .], 0) AT_CHECK([chmod u+w water.pdb], 0) AT_CHECK([../../molecuilder --dry-run -i water.pdb --select-atom-by-id 2 --remove-atom --select-atom-by-element 8 --saturate-atoms --output-as $file --no-dry-run --store-session session-atoms-saturate-atoms-bonded_atoms.py --session-type python], 0, [ignore], [ignore]) AT_CHECK([grep -v "Command.*DryRun" session-atoms-saturate-atoms-bonded_atoms.py >session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([../../molecuilderguitest session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/saturated_water_H1.pdb], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Atoms - saturating partial cholesterol molecule]) AT_KEYWORDS([atoms saturate-atoms]) file=saturated_cholesterol.pdb AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/Saturate/pre/cholesterol.pdb .], 0) AT_CHECK([chmod u+w cholesterol.pdb], 0) AT_CHECK([../../molecuilder --dry-run -i cholesterol.pdb --select-atom-by-id 48 50 53 67 73 --remove-atom --select-all-atoms --correct-bonddegree --unselect-atom-by-element 1 --saturate-atoms --output-as $file --no-dry-run --store-session session-atoms-saturate-atoms-bonded_atoms.py --session-type python], 0, [ignore], [ignore]) AT_CHECK([grep -v "Command.*DryRun" session-atoms-saturate-atoms-bonded_atoms.py >session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([../../molecuilderguitest session-atoms-saturate-atoms-bonded_atoms_new.py], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/saturated_cholesterol_H48_50_53_67_73.pdb], 0, [ignore], [ignore]) AT_CLEANUP