Skip to content

Commit

Permalink
Merge branch 'develop' into extpkg_0112
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitani committed Jan 12, 2025
2 parents e1fd23c + aef7016 commit 1f08514
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 13 deletions.
12 changes: 10 additions & 2 deletions build_scripts/build_libcuemol2_posix/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@
# usage: run.sh deplibs_dir [Debug]
#

usage()
{
echo "usage: run.sh deplibs_dir [Debug]"
exit 1
}

if [ -z "${1:-}" ]; then
usage
fi

set -eux

BASEDIR=$1
# RUNNER_OS=$2
# RUNNER_ARCH=$3

REPOS_DIR=$(cd $(dirname $0)/../..; pwd)
WORKSPACE=${GITHUB_WORKSPACE:-$REPOS_DIR}
Expand Down
12 changes: 11 additions & 1 deletion build_scripts/build_libcuemol2_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ SET RUNNER_OS=Windows
SET RUNNER_ARCH=X64
SET TMPDIR=%BASEDIR%\tmp

SET SCRIPT_DIR=%~dp0
echo SCRIPT_DIR: %SCRIPT_DIR%
if "%GITHUB_WORKSPACE%"=="" (
cd %SCRIPT_DIR%\..
for /f %%i in ('cd') do set TOP_DIR=%%i
) ELSE (
SET TOP_DIR=%GITHUB_WORKSPACE%
)
echo TOP_DIR: %TOP_DIR%

mkdir %TMPDIR%
%~d1
cd %TMPDIR%
Expand All @@ -25,7 +35,7 @@ REM Build libcuemol2
SET INSTPATH=%DEPLIBS_DIR%\cuemol2
rd /s /q build

cmake -S %GITHUB_WORKSPACE% -B build ^
cmake -S %TOP_DIR% -B build ^
-DCMAKE_INSTALL_PREFIX=%INSTPATH% ^
-DBoost_ROOT=%DEPLIBS_DIR%\boost_1_84_0 ^
-DCGAL_ROOT=%DEPLIBS_DIR%\CGAL-4.14.3 ^
Expand Down
12 changes: 12 additions & 0 deletions build_scripts/build_uxpgui_posix/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
# host_os ... macOS
# host_arch ... ARM64 X64

usage()
{
echo "usage: run.sh base_dir host_os host_arch"
echo " host_os ... macOS"
echo " host_arch ... ARM64 X64"
exit 1
}

if [ -z "${1:-}" ] || [ -z "${2:-}" ] || [ -z "${3:-}" ]; then
usage
fi

set -eux

BASEDIR=$1
Expand Down
51 changes: 41 additions & 10 deletions src/modules/importers/MmcifMolReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,21 @@ void MmcifMolReader::readAtomLine()
m_nBfac = findDataItem("B_iso_or_equiv");

m_nAuthAtomID = findDataItem("auth_atom_id");
if (m_nAuthAtomID<0) {
LOG_DPRINTLN("mmCIF> Warning: auth_atom_id not found in _atom_site");
}
m_nAuthCompID = findDataItem("auth_comp_id");
if (m_nAuthCompID<0) {
LOG_DPRINTLN("mmCIF> Warning: auth_comp_id not found in _atom_site");
}
m_nAuthSeqID = findDataItem("auth_seq_id");
if (m_nAuthSeqID<0) {
LOG_DPRINTLN("mmCIF> Warning: auth_seq_id not found in _atom_site");
}
m_nAuthAsymID = findDataItem("auth_asym_id");

if (m_nAuthAsymID<0) {
LOG_DPRINTLN("mmCIF> Warning: auth_asym_id not found in _atom_site");
}
m_nModelID = findDataItem("pdbx_PDB_model_num");

m_bLoopDefsOK = true;
Expand All @@ -458,25 +469,45 @@ void MmcifMolReader::readAtomLine()

ElemID eleid = ElemSym::str2SymID(getToken(m_nTypeSymbol));

LString atomname1, atomname2;
LString atomname;
if (m_nAuthAtomID>=0) {
atomname1 = getToken(m_nAuthAtomID);
if (atomname1.getAt(0)=='"')
atomname1 = atomname1.substr(1, atomname1.length()-2);
atomname = getToken(m_nAuthAtomID);
}
else if (m_nLabelAtomID>=0) {
atomname = getToken(m_nLabelAtomID);
}
else {
error("invalid mmCIF format, cannot get atom name (_atom_site.label_atom_id)");
return;
}
if (m_nLabelAtomID>=0)
atomname2 = getToken(m_nLabelAtomID);
if (atomname.getAt(0)=='"')
atomname = atomname.substr(1, atomname.length()-2);

LString resname1;
if (m_nAuthCompID>=0) {
resname1 = getToken(m_nAuthCompID);
}
else if (m_nLabelCompID>=0) {
resname1 = getToken(m_nLabelCompID);
}
else {
error("invalid mmCIF format, cannot get residue name (_atom_site.label_comp_id)");
return;
}

char confid = getConfID(m_nLabelAltID); //getToken(m_nLabelAltID);

LString chain1;
if (m_nAuthAsymID>=0)
chain1 = getToken(m_nAuthAsymID);
if (m_nAuthAsymID>=0) {
chain1 = getToken(m_nAuthAsymID);
}
else if (m_nLabelAsymID>=0) {
chain1 = getToken(m_nLabelAsymID);
}
else {
error("invalid mmCIF format, cannot get chain name (_atom_site.label_asym_id)");
return;
}

ResidIndex residx = getResidIndex(m_nAuthSeqID, m_nInsCode);

Expand Down Expand Up @@ -524,7 +555,7 @@ void MmcifMolReader::readAtomLine()

MolAtomPtr pAtom = MolAtomPtr(MB_NEW MolAtom());
pAtom->setParentUID(m_pMol->getUID());
pAtom->setName(atomname1);
pAtom->setName(atomname);
pAtom->setElement(eleid);
pAtom->setChainName(chain1);
pAtom->setResIndex(residx);
Expand Down
4 changes: 4 additions & 0 deletions uxp_gui/cuemol2/base/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ cuemol2.jar:
content/cuemol2/cuemol2.css (content/cuemol2.css)
#ifdef XP_MACOSX
content/cuemol2/cuemol2-sysdep.css (content/macosx.css)
#elif XP_WIN
content/cuemol2/cuemol2-sysdep.css (content/windows7.css)
#elif MOZ_WIDGET_GTK
content/cuemol2/cuemol2-sysdep.css (content/gdk-x11.css)
#endif
#
# Config Dialog
Expand Down

0 comments on commit 1f08514

Please sign in to comment.